Commit c2a63ac5 authored by Daniel Black's avatar Daniel Black Committed by Daniel Black

unittest: my_getopt-t errors on -ve ul{l,}

parent 46852b3b
...@@ -377,16 +377,11 @@ int main(int argc __attribute__((unused)), char **argv) ...@@ -377,16 +377,11 @@ int main(int argc __attribute__((unused)), char **argv)
ok(res==0 && arg_c==0 && opt_ull==100, ok(res==0 && arg_c==0 && opt_ull==100,
"res:%d, argc:%d, opt_ull:%llu", res, arg_c, opt_ull); "res:%d, argc:%d, opt_ull:%llu", res, arg_c, opt_ull);
/*
negative numbers are wrapped. this is kinda questionable,
we might want to fix it eventually. but it'd be a change in behavior,
users might've got used to "-1" meaning "max possible value"
*/
run("--ull=-100", NULL); run("--ull=-100", NULL);
ok(res==0 && arg_c==0 && opt_ull==18446744073709551516ULL, ok(res==9 && arg_c==1 && opt_ull==0ULL,
"res:%d, argc:%d, opt_ull:%llu", res, arg_c, opt_ull); "res:%d, argc:%d, opt_ull:%llu", res, arg_c, opt_ull);
run("--ul=-100", NULL); run("--ul=-100", NULL);
ok(res==0 && arg_c==0 && opt_ul==4294967295UL, ok(res==9 && arg_c==1 && opt_ul==0UL,
"res:%d, argc:%d, opt_ul:%lu", res, arg_c, opt_ul); "res:%d, argc:%d, opt_ul:%lu", res, arg_c, opt_ul);
my_end(0); my_end(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment