diff options
author | Alberto <alberto.ruiz@codethink.co.uk> | 2011-10-03 18:18:53 +0100 |
---|---|---|
committer | Alberto <alberto.ruiz@codethink.co.uk> | 2011-10-03 18:18:53 +0100 |
commit | 8e980fb77aea3832e994955f366a1a4b57d204ee (patch) | |
tree | 6c910c9bed91f4b7749b5a691a95287ac8f3b5af /tests/05_symlink_add_remove.sh | |
parent | 03dfbf38e41cfc9d84d81c4491e6d36f73056cbf (diff) | |
download | tbdiff-8e980fb77aea3832e994955f366a1a4b57d204ee.tar.gz |
Rearranging unit tests
Diffstat (limited to 'tests/05_symlink_add_remove.sh')
-rwxr-xr-x | tests/05_symlink_add_remove.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/05_symlink_add_remove.sh b/tests/05_symlink_add_remove.sh new file mode 100755 index 0000000..147b8f0 --- /dev/null +++ b/tests/05_symlink_add_remove.sh @@ -0,0 +1,29 @@ +#!/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 ############ + +function setup { + ln -s /foo $ORIGIN/remove && \ + ln -s /bar $TARGET/add && \ + chown -h :cdrom $TARGET/add +} + +function 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 +} + +############################################# +main $@ |