]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Add tests for empty file names and pathchk -P.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 10 Jan 2005 18:09:22 +0000 (18:09 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 10 Jan 2005 18:09:22 +0000 (18:09 +0000)
tests/misc/pathchk1

index 5735b4e6764cf959a2efa24beac224e8cdc2b51c..7d2d3de8838c7f9523891ab9f5bd9704a380a6a1 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# ensure that pathchk exits nonzero in one particular case where it didn't
+# pathchk tests
 
 if test "$VERBOSE" = yes; then
   set -x
@@ -29,4 +29,12 @@ fail=0
 # but exited successfully.
 pathchk file/x > /dev/null 2>&1 && fail=1
 
+# This should exit nonzero.  Through 5.3.0 it exited with status zero.
+pathchk -p '' > /dev/null 2>&1 && fail=1
+
+# This tests the new -P option.
+pathchk -P '' > /dev/null 2>&1 && fail=1
+pathchk -P -- - > /dev/null 2>&1 && fail=1
+pathchk -p -P x/- > /dev/null 2>&1 && fail=1
+
 (exit $fail); exit $fail