summaryrefslogtreecommitdiff
path: root/tests/symlink_add_remove.sh.disabled
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2013-11-04 10:11:13 +0000
committerBen Brown <ben.brown@codethink.co.uk>2013-11-05 12:00:29 +0000
commit6695045aa6da08d572363fe14c7c7565c7bfcb9b (patch)
tree7f8a1d886db40dfbdc7d78d84cd7844c97e6b0bd /tests/symlink_add_remove.sh.disabled
parent7804883ce512a7cacb911cdea3a4896ecb79b22b (diff)
downloadtbdiff-6695045aa6da08d572363fe14c7c7565c7bfcb9b.tar.gz
Conversion of tbdiff directory tests
Disabled (renamed) old tests that have been converted Removed compilation instruction for symtime.c from README
Diffstat (limited to 'tests/symlink_add_remove.sh.disabled')
-rwxr-xr-xtests/symlink_add_remove.sh.disabled48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/symlink_add_remove.sh.disabled b/tests/symlink_add_remove.sh.disabled
new file mode 100755
index 0000000..badf199
--- /dev/null
+++ b/tests/symlink_add_remove.sh.disabled
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+TEST_ID="05"
+TEST_NAME="Symlink add/remove"
+
+CREATE=`pwd`/$1
+DEPLOY=`pwd`/$2
+TEST_TOOLS=$3
+
+. ./test_lib.sh
+
+############# Test specific code ############
+
+setup_origin () {
+ (
+ cd $ORIGIN
+ ln -s /foo remove &&
+ mkdir -p data &&
+ touch data/a data/b &&
+ ln -s data datalink
+ )
+}
+
+setup_target () {
+ mkdir -p $TARGET/data &&
+ touch $TARGET/data/a $TARGET/data/b &&
+ ln -s /bar $TARGET/add &&
+ chown -h :cdrom $TARGET/add
+}
+
+check_results () {
+ test -L $ORIGIN/add &&
+ test ! -L $ORIGIN/remove &&
+ check_symlink $ORIGIN/add "/bar" &&
+ check_same_mtime $ORIGIN/add $TARGET/add &&
+ check_same_uidgid $ORIGIN/add $TARGET/add &&
+ test ! -L $ORIGIN/datalink &&
+ echo datalink not link &&
+ test -d $ORIGIN/data &&
+ echo data is dir &&
+ test -f $ORIGIN/data/a &&
+ echo a is dir &&
+ test -f $ORIGIN/data/b &&
+ echo b is dir
+}
+
+#############################################
+main $@