]> gitweb.michael.orlitzky.com - apply-default-acl.git/commitdiff
run-tests.sh: add tests for "./" and "../" as arguments, too.
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 18 Jun 2018 01:45:47 +0000 (21:45 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 18 Jun 2018 01:45:47 +0000 (21:45 -0400)
run-tests.sh

index 06d2508843593307613d601bd76cc5aa7a080bef..cb04d47cf759f1d44205eb4fab66e4725320f9ad 100755 (executable)
@@ -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