From: Michael Orlitzky Date: Mon, 18 Jun 2018 01:45:47 +0000 (-0400) Subject: run-tests.sh: add tests for "./" and "../" as arguments, too. X-Git-Tag: v0.4.1~3 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=6f5f41a8a87ac60de171e18e6d233f34f61c4454;p=apply-default-acl.git run-tests.sh: add tests for "./" and "../" as arguments, too. --- diff --git a/run-tests.sh b/run-tests.sh index 06d2508..cb04d47 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -896,6 +896,20 @@ ACTUAL=$( getfacl --omit-header "./baz" ) popd > /dev/null compare +# Ensure that "./" works as an argument. +((TESTNUM++)) +TARGET="${TESTDIR}" +mkdir "${TARGET}/foo" +mkdir "${TARGET}/bar" +setfacl --default --modify user:${USERS[0]}:rw "${TARGET}" +"${BIN}" "${TARGET}/foo" +EXPECTED=$( getfacl --omit-header "${TARGET}/foo" ) +pushd "${TARGET}/bar" > /dev/null +"${BIN}" "./" +ACTUAL=$( getfacl --omit-header "./" ) +popd > /dev/null +compare + # Ensure that ".." works as an argument. ((TESTNUM++)) TARGET="${TESTDIR}" @@ -923,3 +937,17 @@ pushd "${TARGET}/bar/baz" > /dev/null ACTUAL=$( getfacl --omit-header "." ) popd > /dev/null compare + +# Ensure that "../" works as an argument. +((TESTNUM++)) +TARGET="${TESTDIR}" +mkdir "${TARGET}/foo" +mkdir -p "${TARGET}/bar/baz" +setfacl --default --modify user:${USERS[0]}:rw "${TARGET}" +"${BIN}" "${TARGET}/foo" +EXPECTED=$( getfacl --omit-header "${TARGET}/foo" ) +pushd "${TARGET}/bar/baz" > /dev/null +"${BIN}" "../" +ACTUAL=$( getfacl --omit-header "../" ) +popd > /dev/null +compare