Slight test improvements

This commit is contained in:
2013-07-05 00:56:55 +02:00
parent bcdbcbe03a
commit d8ef9d824d
2 changed files with 5 additions and 5 deletions

View File

@@ -7,8 +7,7 @@ source "../../src/lib/internals.sh"
#
# Create temp files/folders used for locate-dotfile() tests.
mkdir -p "test-tmp/without"
mkdir -p "test-tmp/with"
mkdir -p "test-tmp/with" "test-tmp/without"
touch "test-tmp/with/Dotfile"
# When $DOTFILE is empty and current path has a Dotfile.
@@ -43,9 +42,7 @@ unset DOTFILE
# Remove temp files/folders used for locate-dotfile() tests.
rm "test-tmp/with/Dotfile"
rmdir "test-tmp/with"
rmdir "test-tmp/without"
rmdir "test-tmp"
rmdir "test-tmp/with" "test-tmp/without" "test-tmp"
# Ensure temp files/folder were cleaned up.
assert_raises "test -d test-tmp" 1

View File

@@ -3,4 +3,7 @@ source "../test-helper.sh"
source "../../src/lib/trim.sh"
assert 'trim " foo bar "' "foo bar"
assert 'trim "foo bar "' "foo bar"
assert 'trim " foo bar"' "foo bar"
assert 'trim "foo bar"' "foo bar"
assert_end "trim()"