summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlberto Ruiz <alberto.ruiz@codethink.co.uk>2011-10-04 02:08:12 +0100
committerAlberto Ruiz <alberto.ruiz@codethink.co.uk>2011-10-04 02:08:12 +0100
commitece2c8f162a0f810ccaff946c216def18cc47f2f (patch)
treeb6ec90fbfc807491666cc294ad9dede2de395a85 /tests
parentb2edcd480559a18df4d67db25cf3888f42399f60 (diff)
downloadtbdiff-ece2c8f162a0f810ccaff946c216def18cc47f2f.tar.gz
Enhance dir add remove test
Diffstat (limited to 'tests')
-rwxr-xr-xtests/07_dir_add_remove.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/07_dir_add_remove.sh b/tests/07_dir_add_remove.sh
index e141351..fe34a0e 100755
--- a/tests/07_dir_add_remove.sh
+++ b/tests/07_dir_add_remove.sh
@@ -1,7 +1,7 @@
#!/bin/bash
-TEST_ID="05"
-TEST_NAME="Symlink add/remove"
+TEST_ID="07"
+TEST_NAME="Directory add remove"
CREATE=`pwd`/$1
DEPLOY=`pwd`/$2
@@ -12,17 +12,20 @@ TEST_TOOLS=$3
############# Test specific code ############
function setup {
- mkdir $ORIGIN/remove && \
- mkdir $TARGET/add && \
+ mkdir -p $ORIGIN/remove/1/2/3/4 && \
+ mkdir -p $TARGET/add/4/3/2/1 && \
chown -h :cdrom $TARGET/add
+ chown -h :cdrom $TARGET/add/4/3/2/1
}
function check_results {
- test -d $ORIGIN/add && \
+ test -d $ORIGIN/add/4/3/2/1 && \
test ! -d $ORIGIN/remove && \
check_same_mtime $ORIGIN/add $TARGET/add && \
check_same_mode $ORIGIN/add $TARGET/add && \
- check_same_uidgid $ORIGIN/add $TARGET/add
+ check_same_uidgid $ORIGIN/add $TARGET/add && \
+ check_same_mode $ORIGIN/add $TARGET/add && \
+ check_same_uidgid $ORIGIN/add/4/3/2/1 $TARGET/add/4/3/2/1
}
#############################################