summaryrefslogtreecommitdiff
path: root/tests/06_dir_diff.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/06_dir_diff.sh')
-rwxr-xr-xtests/06_dir_diff.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/06_dir_diff.sh b/tests/06_dir_diff.sh
new file mode 100755
index 0000000..36fed65
--- /dev/null
+++ b/tests/06_dir_diff.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+TEST_ID="06"
+TEST_NAME="Dir difference"
+
+CREATE=`pwd`/$1
+DEPLOY=`pwd`/$2
+TEST_TOOLS=$3
+
+. ./test_lib.sh
+
+############# Test specific code ############
+
+function setup {
+ mkdir $ORIGIN/a && \
+ mkdir $TARGET/a && \
+ echo "1" > $TARGET/a/1 && \
+ chown -h :cdrom $TARGET/a && \
+ chmod 707 $TARGET/a
+}
+
+function check_results {
+ test -d $ORIGIN/a && \
+ test -f $ORIGIN/a && \
+ 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 $@