Lines Matching refs:parse_range
170 assert_se(parse_range("111", &lower, &upper) == 0);
174 assert_se(parse_range("111-123", &lower, &upper) == 0);
178 assert_se(parse_range("123-111", &lower, &upper) == 0);
182 assert_se(parse_range("123-123", &lower, &upper) == 0);
186 assert_se(parse_range("0", &lower, &upper) == 0);
190 assert_se(parse_range("0-15", &lower, &upper) == 0);
194 assert_se(parse_range("15-0", &lower, &upper) == 0);
198 assert_se(parse_range("128-65535", &lower, &upper) == 0);
202 assert_se(parse_range("1024-4294967295", &lower, &upper) == 0);
207 assert_se(parse_range(" 111", &lower, &upper) == 0);
211 assert_se(parse_range(" 111-123", &lower, &upper) == 0);
215 assert_se(parse_range("111- 123", &lower, &upper) == 0);
219 assert_se(parse_range("\t111-\t123", &lower, &upper) == 0);
223 assert_se(parse_range(" \t 111- \t 123", &lower, &upper) == 0);
229 assert_se(parse_range("111garbage", &lower, &upper) == -EINVAL);
233 assert_se(parse_range("garbage111", &lower, &upper) == -EINVAL);
237 assert_se(parse_range("garbage", &lower, &upper) == -EINVAL);
241 assert_se(parse_range("111-123garbage", &lower, &upper) == -EINVAL);
245 assert_se(parse_range("111garbage-123", &lower, &upper) == -EINVAL);
251 assert_se(parse_range("", &lower, &upper) == -EINVAL);
256 assert_se(parse_range("111--123", &lower, &upper) == -ERANGE);
260 assert_se(parse_range("-111-123", &lower, &upper) == -EINVAL);
264 assert_se(parse_range("111-123-", &lower, &upper) == -EINVAL);
268 assert_se(parse_range("111.4-123", &lower, &upper) == -EINVAL);
272 assert_se(parse_range("111-123.4", &lower, &upper) == -EINVAL);
276 assert_se(parse_range("111,4-123", &lower, &upper) == -EINVAL);
280 assert_se(parse_range("111-123,4", &lower, &upper) == -EINVAL);
285 assert_se(parse_range("111-", &lower, &upper) == -EINVAL);
289 assert_se(parse_range("111-123-", &lower, &upper) == -EINVAL);
293 assert_se(parse_range("111--", &lower, &upper) == -EINVAL);
297 assert_se(parse_range("111- ", &lower, &upper) == -EINVAL);
302 assert_se(parse_range("111 123", &lower, &upper) == -EINVAL);
306 assert_se(parse_range("111\t123", &lower, &upper) == -EINVAL);
310 assert_se(parse_range("111 \t 123", &lower, &upper) == -EINVAL);
315 assert_se(parse_range("111 ", &lower, &upper) == -EINVAL);
319 assert_se(parse_range("111-123 ", &lower, &upper) == -EINVAL);
323 assert_se(parse_range("111 -123", &lower, &upper) == -EINVAL);
327 assert_se(parse_range("111 -123 ", &lower, &upper) == -EINVAL);
331 assert_se(parse_range("111\t-123\t", &lower, &upper) == -EINVAL);
335 assert_se(parse_range("111 \t -123 \t ", &lower, &upper) == -EINVAL);
340 assert_se(parse_range("0-18446744073709551616", &lower, &upper) == -ERANGE);