From: Michael Orlitzky Date: Fri, 2 Mar 2018 00:21:16 +0000 (-0500) Subject: run-tests.sh: add a test for the "Not a directory" error message. X-Git-Tag: v0.2.0~8 X-Git-Url: https://gitweb.michael.orlitzky.com/?p=apply-default-acl.git;a=commitdiff_plain;h=95e752b65a9ce49d707c16a521f141ef2f0c4a3b run-tests.sh: add a test for the "Not a directory" error message. --- diff --git a/run-tests.sh b/run-tests.sh index 68b3b80..ad50c79 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -864,3 +864,13 @@ mkdir "${TESTDIR}/baz" ACTUAL="$?" EXPECTED="0" compare + + +# We should get "Not a directory" if we stick a trailing slash on the +# end of the path to a file. +TESTNUM=39 +TARGET="${TESTDIR}/foo" +touch "${TARGET}" +ACTUAL=$( "${BIN}" "${TARGET}/" 2>&1 ) +EXPECTED="${TARGET}/: Not a directory" +compare