mirror of
https://github.com/jimeh/dotify.git
synced 2026-02-19 10:06:39 +00:00
Slight test improvements
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()"
|
||||
|
||||
Reference in New Issue
Block a user