From c2a63ac526bf4cd269def30a3d55ff29fdba8f86 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Sun, 12 Apr 2020 12:33:44 +1000 Subject: unittest: my_getopt-t errors on -ve ul{l,} --- unittest/mysys/my_getopt-t.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/unittest/mysys/my_getopt-t.c b/unittest/mysys/my_getopt-t.c index 4b50468ac3f..6ffbfb20789 100644 --- a/unittest/mysys/my_getopt-t.c +++ b/unittest/mysys/my_getopt-t.c @@ -377,16 +377,11 @@ int main(int argc __attribute__((unused)), char **argv) ok(res==0 && arg_c==0 && opt_ull==100, "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); - 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); 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); my_end(0); -- cgit v1.2.1