Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Have the spec file put more useful stuff into the doc dir.
[rsync/rsync.git]
/
testsuite
/
executability.test
diff --git
a/testsuite/executability.test
b/testsuite/executability.test
index
2f205cd
..
b11e672
100644
(file)
--- a/
testsuite/executability.test
+++ b/
testsuite/executability.test
@@
-1,14
+1,12
@@
#! /bin/sh
#! /bin/sh
-# This program is distributable under the terms of the GNU GPL see
+# This program is distributable under the terms of the GNU GPL
(
see
# COPYING).
# Test the --executability or -E option. -- Matt McCutchen
. $srcdir/testsuite/rsync.fns
# COPYING).
# Test the --executability or -E option. -- Matt McCutchen
. $srcdir/testsuite/rsync.fns
-set -x
-
# Put some files in the From directory
mkdir "$fromdir"
cat <<EOF >"$fromdir/1"
# Put some files in the From directory
mkdir "$fromdir"
cat <<EOF >"$fromdir/1"
@@
-20,13
+18,13
@@
cat <<EOF >"$fromdir/2"
echo 'Program Two!'
EOF
echo 'Program Two!'
EOF
-chmod 700 "$fromdir/1" || test_skipped "Can't chmod"
+chmod
1
700 "$fromdir/1" || test_skipped "Can't chmod"
chmod 600 "$fromdir/2"
$RSYNC -rvv "$fromdir/" "$todir/"
chmod 600 "$fromdir/2"
$RSYNC -rvv "$fromdir/" "$todir/"
-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"
+check_perms "$todir/1" rwx------
1
+check_perms "$todir/2" rw-------
1
# Mix up the permissions a bit
chmod 600 "$fromdir/1"
# Mix up the permissions a bit
chmod 600 "$fromdir/1"
@@
-36,14
+34,14
@@
chmod 604 "$todir/2"
$RSYNC -rvv "$fromdir/" "$todir/"
# No -E, so nothing should have changed
$RSYNC -rvv "$fromdir/" "$todir/"
# No -E, so nothing should have changed
-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"
+check_perms "$todir/1" rwx------
2
+check_perms "$todir/2" rw----r--
2
$RSYNC -rvvE "$fromdir/" "$todir/"
# Now things should have happened!
$RSYNC -rvvE "$fromdir/" "$todir/"
# Now things should have happened!
-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"
+check_perms "$todir/1" rw-------
3
+check_perms "$todir/2" rwx---r-x
3
# Hooray
exit 0
# Hooray
exit 0