diff options
author | Ben Brown <ben.brown@codethink.co.uk> | 2013-11-06 14:27:08 +0000 |
---|---|---|
committer | Ben Brown <ben.brown@codethink.co.uk> | 2013-11-06 14:27:08 +0000 |
commit | 057bee132cf0bde4db35a6c6e7c4724e9331ce03 (patch) | |
tree | 19d33be6f8288ed21888fd69fb208ead12f0a871 /tests/dir_diff.sh.disabled | |
parent | 7804883ce512a7cacb911cdea3a4896ecb79b22b (diff) | |
parent | daddec13b84ca2729a1d9e09d9df260663557ba8 (diff) | |
download | tbdiff-057bee132cf0bde4db35a6c6e7c4724e9331ce03.tar.gz |
Merge branch 'benbrown/S9451/convert-directory-tests'
Diffstat (limited to 'tests/dir_diff.sh.disabled')
-rwxr-xr-x | tests/dir_diff.sh.disabled | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/dir_diff.sh.disabled b/tests/dir_diff.sh.disabled new file mode 100755 index 0000000..f9f56dd --- /dev/null +++ b/tests/dir_diff.sh.disabled @@ -0,0 +1,40 @@ +#!/bin/bash + +TEST_ID="06" +TEST_NAME="Dir difference" + +CREATE=`pwd`/$1 +DEPLOY=`pwd`/$2 +TEST_TOOLS=$3 + +. ./test_lib.sh + +############# Test specific code ############ + +setup_origin () { + mkdir $ORIGIN/a $ORIGIN/sticky $ORIGIN/setgid +} + +setup_target () { + mkdir $TARGET/a $TARGET/sticky $TARGET/setgid && + echo "1" > $TARGET/a/1 && + chown -h :cdrom $TARGET/a && + chmod +t $TARGET/sticky && + chmod g+s $TARGET/setgid && + chmod 707 $TARGET/a +} + +check_results () { + test -d $ORIGIN/a && + test -f $ORIGIN/a/1 && + test -k $ORIGIN/sticky && + test -g $ORIGIN/setgid && + check_same_mode $ORIGIN/a $TARGET/a && \ + check_same_uidgid $ORIGIN/a $TARGET/a && \ + check_same_mode $ORIGIN/a/1 $TARGET/a/1 && + check_same_uidgid $ORIGIN/a/1 $TARGET/a/1 && + check_content $ORIGIN/a/1 "1" +} + +############################################# +main $@ |