From 95e752b65a9ce49d707c16a521f141ef2f0c4a3b Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 1 Mar 2018 19:21:16 -0500 Subject: [PATCH] run-tests.sh: add a test for the "Not a directory" error message. --- run-tests.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.44.2