summaryrefslogtreecommitdiff
path: root/tests/02_symlink_add_remove.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/02_symlink_add_remove.sh')
-rwxr-xr-xtests/02_symlink_add_remove.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/02_symlink_add_remove.sh b/tests/02_symlink_add_remove.sh
new file mode 100755
index 0000000..b3280c2
--- /dev/null
+++ b/tests/02_symlink_add_remove.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+TEST_ID="01"
+TEST_NAME="Simple symlink diff"
+
+CREATE=`pwd`/$1
+DEPLOY=`pwd`/$2
+TEST_TOOLS=$3
+
+. ./test_lib.sh
+
+############# Test specific code ############
+
+# This test checks that normal files content and metadata are
+
+function setup {
+ ln -s /foo $ORIGIN/a && \
+ ln -s /bar $TARGET/a && \
+ chown -h :cdrom $TARGET/a
+}
+
+# check_same_mtime FILE_A FILE_B
+
+function check_results {
+ test -L $ORIGIN/a && \
+ check_symlink $ORIGIN/a "/bar" && \
+ check_group $ORIGIN/a cdrom && \
+ check_same_mtime $ORIGIN/a $ORIGIN/a
+}
+
+#############################################
+main $@