]> gitweb.michael.orlitzky.com - apply-default-acl.git/blobdiff - run-tests.sh
run-tests.sh: add two tests for regular file and symlink exit codes.
[apply-default-acl.git] / run-tests.sh
index e4ca3766721bdb58ff661aa246c3ff0915bc2523..fc7fed4f6090fe49be8af02a561ff14a53c6e18c 100755 (executable)
@@ -798,3 +798,25 @@ other::r--
 EOF
 )
 compare
+
+
+# Test that our exit code succeeds on a single, normal path.
+TESTNUM=33
+TARGET="${TESTDIR}/foo"
+touch "${TARGET}"
+setfacl --default --modify user:${USERS[0]}:rw "${TESTDIR}"
+"${BIN}" "${TARGET}"
+ACTUAL="$?"
+EXPECTED="0"
+compare
+
+# Test that our exit code fails on a symlink.
+TESTNUM=34
+TARGET="${TESTDIR}/bar"
+touch "${TESTDIR}/foo"
+ln -s foo "${TARGET}"
+setfacl --default --modify user:${USERS[0]}:rw "${TESTDIR}"
+"${BIN}" "${TARGET}"
+ACTUAL="$?"
+EXPECTED="1"
+compare