Lines Matching refs:fnmatch

15 ZTEST(fnmatch, test_fnmatch)  in ZTEST()  argument
19 zassert_ok(fnmatch("*.c", "foo.c", 0)); in ZTEST()
20 zassert_ok(fnmatch("*.c", ".c", 0)); in ZTEST()
21 zassert_equal(fnmatch("*.a", "foo.c", 0), FNM_NOMATCH); in ZTEST()
22 zassert_ok(fnmatch("*.c", ".foo.c", 0)); in ZTEST()
23 zassert_equal(fnmatch("*.c", ".foo.c", FNM_PERIOD), FNM_NOMATCH); in ZTEST()
24 zassert_ok(fnmatch("*.c", "foo.c", FNM_PERIOD)); in ZTEST()
25 zassert_equal(fnmatch("a\\*.c", "a*.c", FNM_NOESCAPE), FNM_NOMATCH); in ZTEST()
26 zassert_equal(fnmatch("a\\*.c", "ax.c", 0), FNM_NOMATCH); in ZTEST()
27 zassert_ok(fnmatch("a[xy].c", "ax.c", 0)); in ZTEST()
28 zassert_ok(fnmatch("a[!y].c", "ax.c", 0)); in ZTEST()
29 zassert_equal(fnmatch("a[a/z]*.c", "a/x.c", FNM_PATHNAME), FNM_NOMATCH); in ZTEST()
30 zassert_ok(fnmatch("a/*.c", "a/x.c", FNM_PATHNAME)); in ZTEST()
31 zassert_equal(fnmatch("a*.c", "a/x.c", FNM_PATHNAME), FNM_NOMATCH); in ZTEST()
32 zassert_ok(fnmatch("*/foo", "/foo", FNM_PATHNAME)); in ZTEST()
33 zassert_ok(fnmatch("-O[01]", "-O1", 0)); in ZTEST()
36 zassert_ok(fnmatch("[!]a-]", "b", 0)); in ZTEST()
37 zassert_ok(fnmatch("[]-_]", "^", 0)); in ZTEST()
38 zassert_ok(fnmatch("[!]-_]", "X", 0)); in ZTEST()
39 zassert_equal(fnmatch("??", "-", 0), FNM_NOMATCH); in ZTEST()
40 zassert_equal(fnmatch("*LIB*", "lib", FNM_PERIOD), FNM_NOMATCH); in ZTEST()
42 zassert_equal(fnmatch("a[/]b", "a/b", FNM_PATHNAME), FNM_NOMATCH); in ZTEST()
43 zassert_ok(fnmatch("[a-z]/[a-z]", "a/b", 0)); in ZTEST()
44 zassert_equal(fnmatch("*", "a/b", FNM_PATHNAME), FNM_NOMATCH); in ZTEST()
45 zassert_equal(fnmatch("*[/]b", "a/b", FNM_PATHNAME), FNM_NOMATCH); in ZTEST()
46 zassert_equal(fnmatch("*[b]", "a/b", FNM_PATHNAME), FNM_NOMATCH); in ZTEST()
47 zassert_equal(fnmatch("[*]/b", "a/b", 0), FNM_NOMATCH); in ZTEST()
48 zassert_ok(fnmatch("[*]/b", "*/b", 0)); in ZTEST()
49 zassert_equal(fnmatch("[?]/b", "a/b", 0), FNM_NOMATCH); in ZTEST()
50 zassert_ok(fnmatch("[?]/b", "?/b", 0)); in ZTEST()
51 zassert_ok(fnmatch("[[a]/b", "a/b", 0)); in ZTEST()
52 zassert_ok(fnmatch("[[a]/b", "[/b", 0)); in ZTEST()
53 zassert_equal(fnmatch("\\*/b", "a/b", 0), FNM_NOMATCH); in ZTEST()
54 zassert_ok(fnmatch("\\*/b", "*/b", 0)); in ZTEST()
55 zassert_equal(fnmatch("\\?/b", "a/b", 0), FNM_NOMATCH); in ZTEST()
56 zassert_ok(fnmatch("\\?/b", "?/b", 0)); in ZTEST()
57 zassert_ok(fnmatch("[/b", "[/b", 0)); in ZTEST()
58 zassert_ok(fnmatch("\\[/b", "[/b", 0)); in ZTEST()
59 zassert_ok(fnmatch("??" in ZTEST()
62 zassert_ok(fnmatch("???b", "aa/b", 0)); in ZTEST()
63 zassert_equal(fnmatch("???b", "aa/b", FNM_PATHNAME), FNM_NOMATCH); in ZTEST()
64 zassert_equal(fnmatch("?a/b", ".a/b", FNM_PATHNAME | FNM_PERIOD), FNM_NOMATCH); in ZTEST()
65 zassert_equal(fnmatch("a/?b", "a/.b", FNM_PATHNAME | FNM_PERIOD), FNM_NOMATCH); in ZTEST()
66 zassert_equal(fnmatch("*a/b", ".a/b", FNM_PATHNAME | FNM_PERIOD), FNM_NOMATCH); in ZTEST()
67 zassert_equal(fnmatch("a/*b", "a/.b", FNM_PATHNAME | FNM_PERIOD), FNM_NOMATCH); in ZTEST()
70 zassert_ok(fnmatch("*/?", "a/b", FNM_PATHNAME | FNM_PERIOD)); in ZTEST()
71 zassert_ok(fnmatch("?/*", "a/b", FNM_PATHNAME | FNM_PERIOD)); in ZTEST()
72 zassert_ok(fnmatch(".*/?", ".a/b", FNM_PATHNAME | FNM_PERIOD)); in ZTEST()
73 zassert_ok(fnmatch("*/.?", "a/.b", FNM_PATHNAME | FNM_PERIOD)); in ZTEST()
74 zassert_equal(fnmatch("*/*", "a/.b", FNM_PATHNAME | FNM_PERIOD), FNM_NOMATCH); in ZTEST()
75 zassert_ok(fnmatch("*?*/*", "a/.b", FNM_PERIOD)); in ZTEST()
76 zassert_ok(fnmatch("*[.]/b", "a./b", FNM_PATHNAME | FNM_PERIOD)); in ZTEST()
78 zassert_not_equal(fnmatch("*[![:digit:]]*/[![:d-d]", "a/b", FNM_PATHNAME), 0); in ZTEST()
79 zassert_not_equal(fnmatch("*[![:digit:]]*/[[:d-d]", "a/[", FNM_PATHNAME), 0); in ZTEST()
80 zassert_not_equal(fnmatch("*[![:digit:]]*/[![:d-d]", "a/[", FNM_PATHNAME), 0); in ZTEST()
81 zassert_ok(fnmatch("a?b", "a.b", FNM_PATHNAME | FNM_PERIOD)); in ZTEST()
82 zassert_ok(fnmatch("a*b", "a.b", FNM_PATHNAME | FNM_PERIOD)); in ZTEST()
83 zassert_ok(fnmatch("a[.]b", "a.b", FNM_PATHNAME | FNM_PERIOD)); in ZTEST()
86 ZTEST_SUITE(fnmatch, NULL, NULL, NULL, NULL, NULL);