summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2011-10-17 11:48:51 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2011-10-17 11:48:51 +0100
commitfa85a17045e56479c0ec69a40a177c013f487291 (patch)
tree61aca0d795491059834f297d4901c372d5372426 /tests
parent30db9be89e11712d26bc46752d75c4cf86760bd7 (diff)
downloadtbdiff-fa85a17045e56479c0ec69a40a177c013f487291.tar.gz
Added xattr support
Fixed inconsequential memory leak in tbdiff_create.c Lost memory would be cleaned up by OS at exit, but valgrind complains
Diffstat (limited to 'tests')
-rw-r--r--tests/test_lib.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/test_lib.sh b/tests/test_lib.sh
index 85df52b..4185bed 100644
--- a/tests/test_lib.sh
+++ b/tests/test_lib.sh
@@ -41,6 +41,11 @@ check_group () {
test $(stat -c %G $1) = $2
}
+check_xattrs () {
+ test "`getfattr -d $1 2>/dev/null | tail -n +2`" = \
+ "`getfattr -d $2 2>/dev/null | tail -n +2`"
+}
+
# tests whether a command exists
is_command () {
type $1 >/dev/null 2>/dev/null
@@ -88,13 +93,13 @@ start () {
cleanup_and_exit
fi
- if [ ! -f $1 ]
+ if [ ! -f "$1" ]
then
echo "ERROR: $1 is an invalid tbdiff-create path" 1>&2
cleanup_and_exit
fi
- if [ ! -f $2 ]
+ if [ ! -f "$2" ]
then
echo "ERROR: $1 is an invalid tbdiff-deploy path" 1>&2
cleanup_and_exit
@@ -109,7 +114,7 @@ command_succeeded () {
test "$1" = "0"
}
main () {
- start $@
+ start "$@"
echo -n "$TEST_ID Setting up $TEST_NAME test: "
if [ ! -d $TESTDIR ]
then