diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 2 | ||||
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/Makefile.in | 4 | ||||
-rw-r--r-- | test/fnmatch.awk | 6 | ||||
-rw-r--r-- | test/fnmatch.ok | 3 |
5 files changed, 15 insertions, 4 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 01472c65..0be38264 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -2,6 +2,8 @@ * Makefile.am (readdir): Add a check for GNU/Linux and NFS directory and issue a warning if so. + (fts): Ditto for IRIX - can't check for NFS so just print the message. + (fnmatch.awk, fnmatch.ok): Improve portability. 2013-03-20 Arnold D. Robbins <arnold@skeeve.com> diff --git a/test/Makefile.am b/test/Makefile.am index e5a56ce4..cfd46324 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1765,6 +1765,10 @@ readdir: @-$(CMP) $@.ok _$@ && rm -f $@.ok _$@ fts: + @if [ "`uname`" = IRIX ]; then \ + echo This test may fail on IRIX systems when run on an NFS filesystem.; \ + echo If it does, try rerunning on an xfs filesystem. ; \ + fi @echo $@ @$(AWK) -f $(srcdir)/fts.awk @-$(CMP) $@.ok _$@ && rm -f $@.ok _$@ diff --git a/test/Makefile.in b/test/Makefile.in index 0b8906b7..2751ae32 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -2145,6 +2145,10 @@ readdir: @-$(CMP) $@.ok _$@ && rm -f $@.ok _$@ fts: + @if [ "`uname`" = IRIX ]; then \ + echo This test may fail on IRIX systems when run on an NFS filesystem.; \ + echo If it does, try rerunning on an xfs filesystem. ; \ + fi @echo $@ @$(AWK) -f $(srcdir)/fts.awk @-$(CMP) $@.ok _$@ && rm -f $@.ok _$@ diff --git a/test/fnmatch.awk b/test/fnmatch.awk index c0885074..b3717549 100644 --- a/test/fnmatch.awk +++ b/test/fnmatch.awk @@ -1,11 +1,13 @@ @load "fnmatch" BEGIN { - print "FNM_NOMATCH =", FNM_NOMATCH # can't print the values; they vary from system to system for (i in FNM) printf("\"%s\" is an element in FNM\n", i) + # can't even print this + # print "FNM_NOMATCH =", FNM_NOMATCH printf("fnmatch(\"*.a\", \"foo.a\", 0) = %d\n", fnmatch("*.a", "foo.a", 0) ) - printf("fnmatch(\"*.a\", \"foo.c\", 0) = %d\n", fnmatch("*.a", "foo.c", 0)) + if (fnmatch("*.a", "foo.c", 0) == FNM_NOMATCH) + printf("fnmatch(\"*.a\", \"foo.c\", 0) == FNM_NOMATCH\n") } diff --git a/test/fnmatch.ok b/test/fnmatch.ok index fd8a78ce..15bb1916 100644 --- a/test/fnmatch.ok +++ b/test/fnmatch.ok @@ -1,4 +1,3 @@ -FNM_NOMATCH = 1 "LEADING_DIR" is an element in FNM "CASEFOLD" is an element in FNM "NOESCAPE" is an element in FNM @@ -6,4 +5,4 @@ FNM_NOMATCH = 1 "PATHNAME" is an element in FNM "FILE_NAME" is an element in FNM fnmatch("*.a", "foo.a", 0) = 0 -fnmatch("*.a", "foo.c", 0) = 1 +fnmatch("*.a", "foo.c", 0) == FNM_NOMATCH |