From f2f40587da3a56f9c6fa0265fd86a5dacf589276 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 17 Jun 2018 21:00:26 -0400 Subject: [PATCH] run-tests.sh: add recursive versions of the "." and ".." tests. --- run-tests.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/run-tests.sh b/run-tests.sh index f6c3608..06d2508 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -882,6 +882,20 @@ ACTUAL=$( getfacl --omit-header "." ) popd > /dev/null compare +# Ensure that "." works as an argument (recursive). +((TESTNUM++)) +TARGET="${TESTDIR}" +mkdir -p "${TARGET}/foo/baz" +mkdir -p "${TARGET}/bar/baz" +setfacl --default --modify user:${USERS[0]}:rw "${TARGET}" +"${BIN}" --recursive "${TARGET}/foo" +EXPECTED=$( getfacl --omit-header "${TARGET}/foo/baz" ) +pushd "${TARGET}/bar" > /dev/null +"${BIN}" --recursive "." +ACTUAL=$( getfacl --omit-header "./baz" ) +popd > /dev/null +compare + # Ensure that ".." works as an argument. ((TESTNUM++)) TARGET="${TESTDIR}" @@ -895,3 +909,17 @@ pushd "${TARGET}/bar/baz" > /dev/null ACTUAL=$( getfacl --omit-header ".." ) popd > /dev/null compare + +# Ensure that ".." works as an argument (recursive). +((TESTNUM++)) +TARGET="${TESTDIR}" +mkdir -p "${TARGET}/foo/baz" +mkdir -p "${TARGET}/bar/baz" +setfacl --default --modify user:${USERS[0]}:rw "${TARGET}" +"${BIN}" --recursive "${TARGET}/foo" +EXPECTED=$( getfacl --omit-header "${TARGET}/foo/baz" ) +pushd "${TARGET}/bar/baz" > /dev/null +"${BIN}" --recursive ".." +ACTUAL=$( getfacl --omit-header "." ) +popd > /dev/null +compare -- 2.44.2