#!/bin/sh
-# ensure that pathchk exits nonzero in one particular case where it didn't
+# pathchk tests
if test "$VERBOSE" = yes; then
set -x
# 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