Lines Matching +full:0 +full:- +full:9 +full:a +full:- +full:e
1 // SPDX-License-Identifier: GPL-2.0+
12 "\"\"", "" , "=" , "\"-", "," , "-," , ",-" , "-" ,
13 "+," , "--", ",,", "''" , "\"\",", "\",\"", "-\"\"", "\"",
24 "-7" , "--7" , "-1-2" , "7--9",
25 "7-" , "-7--9", "7-9," , "9-7" ,
26 "5-a", "a-5" , "5-8" , ",8-5",
27 "+,1", "-,4" , "-3,0-1,6", "4,-" ,
28 " +2", " -9" , "0-1,-3,6", "- 9" ,
32 { 1, -7, }, { 0, -0, }, { 4, -1, 0, +1, 2, }, { 0, 7, },
33 { 0, +7, }, { 0, -7, }, { 3, +7, 8, +9, 0, }, { 0, 9, },
34 { 0, +5, }, { 0, -0, }, { 4, +5, 6, +7, 8, }, { 0, 0, },
35 { 0, +0, }, { 0, -0, }, { 4, -3, 0, +1, 6, }, { 1, 4, },
36 { 0, +0, }, { 0, -0, }, { 4, +0, 1, -3, 6, }, { 0, 0, },
56 unsigned int i = 0; in cmdline_test_noint()
60 int rc = 0; in cmdline_test_noint()
63 /* Only first and leading '-' will advance the pointer */ in cmdline_test_noint()
64 offset = !!(*str == '-'); in cmdline_test_noint()
71 unsigned int i = 0; in cmdline_test_lead_int()
80 /* Only first '-' after the number will advance the pointer */ in cmdline_test_lead_int()
81 offset = strlen(in) - strlen(str) + !!(rc == 2); in cmdline_test_lead_int()
88 unsigned int i = 0; in cmdline_test_tail_int()
93 /* When "" or "-" the result will be valid integer */ in cmdline_test_tail_int()
94 int rc = strcmp(str, "") ? (strcmp(str, "-") ? 0 : 1) : 1; in cmdline_test_tail_int()
99 * Only first and leading '-' not followed by integer in cmdline_test_tail_int()
102 offset = rc ? strlen(in) : !!(*str == '-'); in cmdline_test_tail_int()
108 unsigned int n, const int *e) in cmdline_do_one_range_test() argument
114 memset(r, 0, sizeof(r)); in cmdline_do_one_range_test()
116 KUNIT_EXPECT_EQ_MSG(test, r[0], e[0], "in test %u (parsed) expected %d numbers, got %d", in cmdline_do_one_range_test()
117 n, e[0], r[0]); in cmdline_do_one_range_test()
119 KUNIT_EXPECT_EQ_MSG(test, r[i], e[i], "in test %u at %u", n, i); in cmdline_do_one_range_test()
121 memset(r, 0, sizeof(r)); in cmdline_do_one_range_test()
122 get_options(in, 0, r); in cmdline_do_one_range_test()
123 KUNIT_EXPECT_EQ_MSG(test, r[0], e[0], "in test %u (validated) expected %d numbers, got %d", in cmdline_do_one_range_test()
124 n, e[0], r[0]); in cmdline_do_one_range_test()
126 p = memchr_inv(&r[1], 0, sizeof(r) - sizeof(r[0])); in cmdline_do_one_range_test()
127 KUNIT_EXPECT_PTR_EQ_MSG(test, p, NULL, "in test %u at %u out of bound", n, p - r); in cmdline_do_one_range_test()
132 unsigned int i = 0; in cmdline_test_range()
136 const int *e = cmdline_test_range_values[i]; in cmdline_test_range() local
138 cmdline_do_one_range_test(test, str, i, e); in cmdline_test_range()