svn commit: r255066 - stable/9/tools/regression/lib/libc/gen

Jilles Tjoelker jilles at FreeBSD.org
Fri Aug 30 10:10:22 UTC 2013


Author: jilles
Date: Fri Aug 30 10:10:22 2013
New Revision: 255066
URL: http://svnweb.freebsd.org/changeset/base/255066

Log:
  MFC r254231: fnmatch(): Add test for r254353 (pattern with single backslash)
  
  This test cannot be converted to an sh(1) test because the syntax would be
  invalid.
  
  r254091 was merged to stable/9 as r254353.
  
  PR:		181129

Modified:
  stable/9/tools/regression/lib/libc/gen/test-fnmatch.c
Directory Properties:
  stable/9/tools/regression/lib/libc/   (props changed)

Modified: stable/9/tools/regression/lib/libc/gen/test-fnmatch.c
==============================================================================
--- stable/9/tools/regression/lib/libc/gen/test-fnmatch.c	Fri Aug 30 10:07:10 2013	(r255065)
+++ stable/9/tools/regression/lib/libc/gen/test-fnmatch.c	Fri Aug 30 10:10:22 2013	(r255066)
@@ -135,6 +135,8 @@ struct testcase {
 	"\\[", "\\[", 0, FNM_NOMATCH,
 	"\\(", "\\(", 0, FNM_NOMATCH,
 	"\\a", "\\a", 0, FNM_NOMATCH,
+	"\\", "\\", 0, FNM_NOMATCH,
+	"\\", "", 0, 0,
 	"\\*", "\\*", FNM_NOESCAPE, 0,
 	"\\?", "\\?", FNM_NOESCAPE, 0,
 	"\\", "\\", FNM_NOESCAPE, 0,
@@ -236,6 +238,8 @@ write_sh_tests(const char *progname, int
 		if (strchr(t->pattern, '\'') != NULL ||
 		    strchr(t->string, '\'') != NULL)
 			continue;
+		if (t->flags == 0 && strcmp(t->pattern, "\\") == 0)
+			continue;
 		if (num == 1 && t->flags == 0)
 			printf("test%smatch '%s' '%s'\n",
 			    t->result == FNM_NOMATCH ? "no" : "",


More information about the svn-src-stable-9 mailing list