summaryrefslogtreecommitdiff
path: root/tests/misc/pathchk1
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-01-10 18:09:22 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-01-10 18:09:22 +0000
commitc1b404410d591e926e7480c88bc1e06aa7645e8b (patch)
tree875d5435796e90ae9357b39bcf3b10fa00c9a52e /tests/misc/pathchk1
parentb4e248dea94fafe585ff32f6b58b112d24f9cfb0 (diff)
downloadcoreutils-c1b404410d591e926e7480c88bc1e06aa7645e8b.tar.xz
Add tests for empty file names and pathchk -P.
Diffstat (limited to 'tests/misc/pathchk1')
-rwxr-xr-xtests/misc/pathchk110
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/misc/pathchk1 b/tests/misc/pathchk1
index 5735b4e67..7d2d3de88 100755
--- a/tests/misc/pathchk1
+++ b/tests/misc/pathchk1
@@ -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