From eb528df301c03139cbd3b9db8323c3d7b3da80a0 Mon Sep 17 00:00:00 2001 From: joshr Date: Sun, 22 Jul 2018 22:43:37 -0400 Subject: [PATCH] test permissions --- tests/test_reveal.bats | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_reveal.bats b/tests/test_reveal.bats index 7f4cfb92..2fa633ed 100644 --- a/tests/test_reveal.bats +++ b/tests/test_reveal.bats @@ -62,6 +62,15 @@ function teardown { run git secret reveal -c -d "$TEST_GPG_HOMEDIR" -p "$password" [ "$status" -eq 0 ] + + local perm1 + local perm2 + perm1=$(ls -l "$FILE_TO_HIDE" | cut -d' ' -f1) + perm2=$(ls -l "$FILE_TO_HIDE".secret | cut -d' ' -f1) + echo "# perm1: $perm1, perm2: $perm2" >&3 + + [ "$perm1" = "$perm2" ] + [ -f "$FILE_TO_HIDE" ] }