diff options
author | Wayne Davison <wayned@samba.org> | 2006-02-03 17:29:43 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2006-02-03 17:29:43 +0000 |
commit | fdbe8989fe544613250e535a825045da05323293 (patch) | |
tree | edc9cebe4f45b0ec2f9f6d4b8a283f33830fe1c8 /testsuite/executability.test | |
parent | 18d7e9f46ec2ee625bfa18c417e5fd89cdd0621c (diff) | |
download | rsync-fdbe8989fe544613250e535a825045da05323293.tar.gz |
Moved check_perms() into rsync.fns and tweaked how it is called.
Diffstat (limited to 'testsuite/executability.test')
-rw-r--r-- | testsuite/executability.test | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/testsuite/executability.test b/testsuite/executability.test index 8ea8fb5b..2f205cd4 100644 --- a/testsuite/executability.test +++ b/testsuite/executability.test @@ -9,15 +9,6 @@ set -x -P600='^-rw-------' -P604='^-rw----r--' -P700='^-rwx------' -P705='^-rwx---r-x' - -check_perms() { - $TOOLDIR/tls "$1" | grep "$2" >/dev/null -} - # Put some files in the From directory mkdir "$fromdir" cat <<EOF >"$fromdir/1" @@ -34,8 +25,8 @@ chmod 600 "$fromdir/2" $RSYNC -rvv "$fromdir/" "$todir/" -check_perms "$todir/1" $P700 || test_fail "After initial transfer: to/1 should have 700 permissions" -check_perms "$todir/2" $P600 || test_fail "After initial transfer: to/2 should have 600 permissions" +check_perms "$todir/1" rwx------ || test_fail "After initial transfer: to/1 should have 700 permissions" +check_perms "$todir/2" rw------- || test_fail "After initial transfer: to/2 should have 600 permissions" # Mix up the permissions a bit chmod 600 "$fromdir/1" @@ -45,14 +36,14 @@ chmod 604 "$todir/2" $RSYNC -rvv "$fromdir/" "$todir/" # No -E, so nothing should have changed -check_perms "$todir/1" $P700 || test_fail "After update without -E: to/1 should still have 700 permissions" -check_perms "$todir/2" $P604 || test_fail "After update without -E: to/2 should still have 604 permissions" +check_perms "$todir/1" rwx------ || test_fail "After update without -E: to/1 should still have 700 permissions" +check_perms "$todir/2" rw----r-- || test_fail "After update without -E: to/2 should still have 604 permissions" $RSYNC -rvvE "$fromdir/" "$todir/" # Now things should have happened! -check_perms "$todir/1" $P600 || test_fail "After update with -E: to/1 should now have 600 permissions" -check_perms "$todir/2" $P705 || test_fail "After update with -E: to/2 should now have 705 permissions" +check_perms "$todir/1" rw------- || test_fail "After update with -E: to/1 should now have 600 permissions" +check_perms "$todir/2" rwx---r-x || test_fail "After update with -E: to/2 should now have 705 permissions" # Hooray exit 0 |