Sanitize unfinished link action integration test a bit

This commit is contained in:
2014-08-21 02:54:01 +01:00
parent ad59c37cfb
commit f8a0ad4ea3

View File

@@ -1,6 +1,5 @@
#! /usr/bin/env bash
source "../test-helper.sh"
source "../../src/lib/dotify-action.sh"
#
# Integration test: link action
@@ -13,12 +12,12 @@ MY_DOTFILE="$TEST_SOURCE/Dotfile"
mkdir -p "$TEST_SOURCE" "$TEST_TARGET"
PROFILE_TXT="# I am a .profile file"
echo "$PROFILE_TXT" > "tmp/source/profile"
echo "$PROFILE_TXT" > "$TEST_SOURCE/profile"
# Basic of basics.
echo -e "profile -> .profile" > "$MY_DOTFILE"
assert_raises "../../bin/dotify -f '$MY_DOTFILE' -t '$TEST_TARGET'" 0
assert "../../bin/dotify -f '$MY_DOTFILE' -t '$TEST_TARGET'" \
assert_raises "dotify -f '$MY_DOTFILE' -t '$TEST_TARGET'" 0
assert "dotify -f '$MY_DOTFILE' -t '$TEST_TARGET'" \
" Create symlink: $TEST_TARGET/.profile -> .dotfiles/profile"
assert "readlink '$TEST_TARGET/.profile'" ".dotfiles/profile"
assert "cat '$TEST_TARGET/.profile'" "$PROFILE_TXT"
@@ -27,7 +26,7 @@ rm "$MY_DOTFILE"
# Remove temp files/folders used for locate-dotfile() tests.
rm "tmp/source/profile"
rmdir "tmp/source" "tmp/target" "tmp"
rm "$TEST_SOURCE/profile"
rmdir "$TEST_SOURCE" "$TEST_TARGET" "tmp"
assert_end 'Integration: link action'