diff --git a/test/lib/internals-test.sh b/test/lib/internals-test.sh index adc4fb6..75c46dd 100755 --- a/test/lib/internals-test.sh +++ b/test/lib/internals-test.sh @@ -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 diff --git a/test/lib/trim-test.sh b/test/lib/trim-test.sh index 5a53aea..659158f 100755 --- a/test/lib/trim-test.sh +++ b/test/lib/trim-test.sh @@ -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()"