From eb8dd9dca1228af0cd132f515509051ecfabf6f6 Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Mon, 14 Apr 2025 17:32:06 +0000 Subject: This commit was manufactured by cvs2git to create tag 'tb_20250414'. --- src/regress/lib/libc/fnmatch/Makefile | 10 -- src/regress/lib/libc/fnmatch/fnm_test.c | 62 -------- src/regress/lib/libc/fnmatch/fnm_test.in | 260 ------------------------------- 3 files changed, 332 deletions(-) delete mode 100644 src/regress/lib/libc/fnmatch/Makefile delete mode 100644 src/regress/lib/libc/fnmatch/fnm_test.c delete mode 100644 src/regress/lib/libc/fnmatch/fnm_test.in (limited to 'src/regress/lib/libc/fnmatch') diff --git a/src/regress/lib/libc/fnmatch/Makefile b/src/regress/lib/libc/fnmatch/Makefile deleted file mode 100644 index 4acdd351bc..0000000000 --- a/src/regress/lib/libc/fnmatch/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# $OpenBSD: Makefile,v 1.2 2011/09/17 15:12:38 stsp Exp $ - -PROG= fnm_test -LDADD+= -lutil -DPADD+= ${LIBUTIL} - -run-regress-${PROG}: - ./${PROG} ${.CURDIR}/${PROG}.in - -.include diff --git a/src/regress/lib/libc/fnmatch/fnm_test.c b/src/regress/lib/libc/fnmatch/fnm_test.c deleted file mode 100644 index ee04f6335e..0000000000 --- a/src/regress/lib/libc/fnmatch/fnm_test.c +++ /dev/null @@ -1,62 +0,0 @@ -/* $OpenBSD: fnm_test.c,v 1.3 2019/01/25 00:19:26 millert Exp $ */ - -/* - * Public domain, 2008, Todd C. Miller - */ - -#include -#include -#include -#include -#include - -int -main(int argc, char **argv) -{ - FILE *fp = stdin; - char pattern[1024], string[1024]; - char *line; - const char delim[3] = {'\0', '\0', '#'}; - int errors = 0, flags, got, want; - - if (argc > 1) { - if ((fp = fopen(argv[1], "r")) == NULL) - err(1, "%s", argv[1]); - } - - /* - * Read in test file, which is formatted thusly: - * - * pattern string flags expected_result - * - * lines starting with '#' are comments - */ - for (;;) { - line = fparseln(fp, NULL, NULL, delim, 0); - if (!line) - break; - got = sscanf(line, "%s %s 0x%x %d", pattern, string, &flags, - &want); - if (got == EOF) { - free(line); - break; - } - if (pattern[0] == '#') { - free(line); - continue; - } - if (got == 4) { - got = fnmatch(pattern, string, flags); - if (got != want) { - warnx("%s %s %d: want %d, got %d", pattern, - string, flags, want, got); - errors++; - } - } else { - warnx("unrecognized line '%s'\n", line); - errors++; - } - free(line); - } - exit(errors); -} diff --git a/src/regress/lib/libc/fnmatch/fnm_test.in b/src/regress/lib/libc/fnmatch/fnm_test.in deleted file mode 100644 index c2f218ae1b..0000000000 --- a/src/regress/lib/libc/fnmatch/fnm_test.in +++ /dev/null @@ -1,260 +0,0 @@ -/bin/[[:alpha:][:alnum:]]* /bin/ls 0x2 0 -/bin/[[:upper:]][[:alnum:]] /bin/ls 0x10 0 -/bin/[[:opper:][:alnum:]]* /bin/ls 0x0 1 -[[:alpha:][:alnum:]]*.c foo1.c 0x4 0 -[[:upper:]]* FOO 0x0 0 -[![:space:]]* bar 0x0 0 -# 'te\st' 'test'; no match if FNM_NOESCAPE -te\st test 0x0 0 -te\st test 0x1 1 -te\st test 0x1e 0 -# 'te\\st' 'te\st'; no match if FNM_NOESCAPE -te\\st te\st 0x0 0 -te\\st te\st 0x1 1 -te\\st te\st 0x1e 0 -# 'te\*t' 'te*t'; no match if FNM_NOESCAPE -te\*t te*t 0x0 0 -te\*t te*t 0x1 1 -te\*t te*t 0x1e 0 -# 'te\*t' 'test'; no match -te\*t test 0x0 1 -te\*t test 0x1f 1 -# 'te\?t' 'te?t'; no match if FNM_NOESCAPE -te\?t te?t 0x0 0 -te\?t te?t 0x1 1 -te\?t te?t 0x1e 0 -# 'te\?t' 'test'; no match -te\?t test 0x0 1 -te\?t test 0x1f 1 -# 'tesT' 'test'; match if FNM_CASEFOLD -tesT test 0x0 1 -tesT test 0xf 1 -tesT test 0x10 0 -# 'test' 'Test'; match if FNM_CASEFOLD -test Test 0x0 1 -test Test 0xf 1 -test Test 0x10 0 -# 'tEst' 'teSt'; match if FNM_CASEFOLD -tEst teSt 0x0 1 -tEst teSt 0xf 1 -tEst teSt 0x10 0 -# '?est' 'test'; match always -?est test 0x0 0 -?est test 0x1f 0 -# 'te?t' 'test'; match always -te?t test 0x0 0 -te?t test 0x1f 0 -# 'tes?' 'test'; match always -tes? test 0x0 0 -tes? test 0x1f 0 -# 'test?' 'test'; no match -test? test 0x0 1 -test? test 0x1f 1 -# '*' always matches anything -* test 0x0 0 -* test 0x1f 0 -# '*test' 'test'; match always -*test test 0x0 0 -*test test 0x1f 0 -# '*est' 'test'; match always -*est test 0x0 0 -*est test 0x1f 0 -# '*st' 'test'; match always -*st test 0x0 0 -*st test 0x1f 0 -# 't*t' 'test'; match always -t*t test 0x0 0 -t*t test 0x1f 0 -# 'te*t' 'test'; match always -te*t test 0x0 0 -te*t test 0x1f 0 -# 'te*st' 'test'; match always -te*st test 0x0 0 -te*st test 0x1f 0 -# 'te*' 'test'; match always -te* test 0x0 0 -te* test 0x1f 0 -# 'tes*' 'test'; match always -tes* test 0x0 0 -tes* test 0x1f 0 -# 'test*' 'test'; match always -test* test 0x0 0 -test* test 0x1f 0 -# '.[\-\t]' '.t'; match always -.[\-\t] .t 0x0 0 -.[\-\t] .t 0x1f 0 -# 'test*?*[a-z]*' 'testgoop'; match always -test*?*[a-z]* testgoop 0x0 0 -test*?*[a-z]* testgoop 0x1f 0 -# 'te[^abc]t' 'test'; match always -te[^abc]t test 0x0 0 -te[^abc]t test 0x1f 0 -# 'te[^x]t' 'test'; match always -te[^x]t test 0x0 0 -te[^x]t test 0x1f 0 -# 'te[!x]t' 'test'; match always -te[!x]t test 0x0 0 -te[^x]t test 0x1f 0 -# 'te[^x]t' 'text'; no match -te[^x]t text 0x0 1 -te[^x]t text 0x1f 1 -# 'te[^\x]t' 'text'; no match -te[^\x]t text 0x0 1 -te[^\x]t text 0x1f 1 -# 'te[^\x' 'text'; no match -te[^\x text 0x0 1 -te[^\x text 0x1f 1 -# 'te[/]t' 'text'; no match -te[/]t text 0x0 1 -te[/]t text 0x1f 1 -# 'te[S]t' 'test'; match if FNM_CASEFOLD -te[S]t test 0x0 1 -te[S]t test 0xf 1 -te[S]t test 0x10 0 -# 'te[r-t]t' 'test'; match always -te[r-t]t test 0x0 0 -te[r-t]t test 0x1f 0 -# 'te[r-t]t' 'teSt'; match if FNM_CASEFOLD -te[r-t]t teSt 0x0 1 -te[r-t]t teSt 0xf 1 -te[r-t]t teSt 0x10 0 -# 'te[r-T]t' 'test'; match if FNM_CASEFOLD -te[r-T]t test 0x0 1 -te[r-T]t test 0xf 1 -te[r-T]t test 0x10 0 -# 'te[R-T]t' 'test'; match if FNM_CASEFOLD -te[R-T]t test 0x0 1 -te[R-T]t test 0xf 1 -te[R-T]t test 0x10 0 -# 'te[r-Tz]t' 'tezt'; match always -te[r-Tz]t tezt 0x0 0 -te[r-Tz]t tezt 0x1f 0 -# 'te[R-T]t' 'tent'; no match -te[R-T]t tent 0x0 1 -te[R-T]t tent 0x1f 1 -# 'tes[]t]' 'test'; match always -tes[]t] test 0x0 0 -tes[]t] test 0x1f 0 -# 'tes[t-]' 'test'; match always -tes[t-] test 0x0 0 -tes[t-] test 0x1f 0 -# 'tes[t-]]' 'test]'; match always -tes[t-]] test] 0x0 0 -tes[t-]] test] 0x1f 0 -# 'tes[t-]]' 'test'; no match -tes[t-]] test 0x0 1 -tes[t-]] test 0x1f 1 -# 'tes[u-]' 'test'; no match -tes[u-] test 0x0 1 -tes[u-] test 0x1f 1 -# 'tes[t-]' 'tes[t-]'; no match -tes[t-] test[t-] 0x0 1 -tes[t-] test[t-] 0x1f 1 -# 'test[/-/]' 'test[/-/]'; no match -test[/-/] test/-/ 0x0 1 -test[/-/] test/-/ 0x1f 1 -# 'test[\/-/]' 'test[/-/]'; no match -test[\/-/] test/-/ 0x0 1 -test[\/-/] test/-/ 0x1f 1 -# 'test[/-\/]' 'test[/-/]'; no match -test[/-\/] test/-/ 0x0 1 -test[/-\/] test/-/ 0x1f 1 -# 'test[/-/]' 'test/'; no match if APR_FNM_PATHNAME -test[/-/] test/ 0x0 0 -test[/-/] test/ 0x2 1 -test[/-/] test/ 0x1d 0 -# 'test[\/-/]' 'test/'; no match if APR_FNM_PATHNAME -test[\/-/] test/ 0x0 0 -test[\/-/] test/ 0x2 1 -test[\/-/] test/ 0x1d 0 -# 'test[/-\/]' 'test/'; no match if APR_FNM_PATHNAME -test[/-\/] test/ 0x0 0 -test[/-\/] test/ 0x2 1 -test[/-\/] test/ 0x1d 0 -# '/test' 'test'; no match -/test test 0x0 1 -/test test 0x1f 1 -# 'test' '/test'; no match -test /test 0x0 1 -test /test 0x1f 1 -# 'test/' 'test'; no match -test/ test 0x0 1 -test/ test 0x1f 1 -# 'test' 'test/'; match if FNM_LEADING_DIR -test test/ 0x0 1 -test test/ 0x17 1 -test test/ 0x8 0 -# '\/test' '/test'; match unless FNM_NOESCAPE -\/test /test 0x0 0 -\/test /test 0x1 1 -\/test /test 0x1e 0 -# '*test' '/test'; match unless FNM_PATHNAME -*test /test 0x0 0 -*test /test 0x2 1 -*test /test 0x1d 0 -# '/*/test' '/test'; no match -/*/test /test 0x0 1 -/*/test /test 0x1f 1 -# '/*/test' '/test/test'; match always -/*/test /test/test 0x0 0 -/*/test /test/test 0x1f 0 -# 'test/this' 'test/'; match never -test/this test/ 0x0 1 -test/this test/ 0x1f 1 -# 'test/' 'test/this'; match never -test/ test/this 0x0 1 -test/ test/this 0x1f 1 -# 'test*/this' 'test/this'; match always -test*/this test/this 0x0 0 -test*/this test/this 0x1f 0 -# 'test*/this' 'test/that'; match never -test*/this test/that 0x0 1 -test*/this test/that 0x1f 1 -# 'test/*this' 'test/this'; match always -test/*this test/this 0x0 0 -test/*this test/this 0x1f 0 -# '.*' '.this'; match always -.* .this 0x0 0 -.* .this 0x1f 0 -# '*' '.this'; fails if FNM_PERIOD -* .this 0x0 0 -* .this 0x4 1 -* .this 0x1b 0 -# '?this' '.this'; fails if FNM_PERIOD -?this .this 0x0 0 -?this .this 0x4 1 -?this .this 0x1b 0 -# '[.]this' '.this'; fails if FNM_PERIOD -[.]this .this 0x0 0 -[.]this .this 0x4 1 -[.]this .this 0x1b 0 -# 'test/this' 'test/this'; match always -test/this test/this 0x0 0 -test/this test/this 0x1f 0 -# 'test?this' 'test/this'; fails if FNM_PATHNAME -test?this test/this 0x0 0 -test?this test/this 0x2 1 -test?this test/this 0x1d 0 -# 'test*this' 'test/this'; fails if FNM_PATHNAME -test*this test/this 0x0 0 -test*this test/this 0x2 1 -test*this test/this 0x1d 0 -# 'test[/]this' 'test/this'; fails if FNM_PATHNAME -test[/]this test/this 0x0 0 -test[/]this test/this 0x2 1 -test[/]this test/this 0x1d 0 -# 'test/.*' 'test/.this'; match always -test/.* test/.this 0x0 0 -test/.* test/.this 0x1f 0 -# 'test/*' 'test/.this'; fails if FNM_PERIOD and FNM_PATHNAME -test/* test/.this 0x0 0 -test/* test/.this 0x6 1 -test/* test/.this 0x19 0 -# 'test/?' 'test/.this'; fails if FNM_PERIOD and FNM_PATHNAME -test/?this test/.this 0x0 0 -test/?this test/.this 0x6 1 -test/?this test/.this 0x19 0 -# 'test/[.]this' 'test/.this'; fails if FNM_PERIOD and FNM_PATHNAME -test/[.]this test/.this 0x0 0 -test/[.]this test/.this 0x6 1 -test/[.]this test/.this 0x19 0 -- cgit v1.2.3-55-g6feb