X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=run-tests.sh;h=a5f7692b7e28e5d4d70a01a06235e48f3c4c6d10;hb=bcb9e71a21f1ba364ca9a2c203de46640a2a7e8d;hp=7f6838f66d5e7d1036aa73098cd4b30ba7cb8c31;hpb=4e313c0b2ad1c2464ce0394b32e70abd5380d48e;p=apply-default-acl.git diff --git a/run-tests.sh b/run-tests.sh index 7f6838f..a5f7692 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -9,12 +9,13 @@ TESTDIR=test acl_reset() { # Remove any ACLs on our test directory and remove its contents. setfacl --remove-all --recursive "$TESTDIR" - rm "${TESTDIR}"/* + rm -f "${TESTDIR}"/* } compare() { if [[ "${ACTUAL}" == "${EXPECTED}" ]]; then echo "Success." + acl_reset else echo "Failure." echo "Expected result:" @@ -32,19 +33,39 @@ mkdir "${TESTDIR}" # When using a minimal ACL, the default user, group, and other # permissions should all be propagated to the mode bits. - TARGET="${TESTDIR}"/foo -touch "${TARGET}" -chmod 777 "${TARGET}" -setfacl -d -m user::r-- "${TESTDIR}" +setfacl -d -m user::r-- "${TESTDIR}" setfacl -d -m group::r-- "${TESTDIR}" setfacl -d -m other::r-- "${TESTDIR}" +touch "${TARGET}" +chmod 777 "${TARGET}" +./aclq "${TARGET}" + +EXPECTED=$(cat <