Change suffix of test files to comply with test-runner.sh defaults

This commit is contained in:
2014-08-21 02:00:06 +01:00
parent 119cf76bff
commit 71bc4d5a44
10 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#! /usr/bin/env bash
source "../test-helper.sh"
source "../../src/lib/dotify-action.sh"
#
# Integration test: link action
#
# Create temp files/folders used for tests.
TEST_SOURCE="tmp/source"
TEST_TARGET="tmp/target"
MY_DOTFILE="$TEST_SOURCE/Dotfile"
mkdir -p "$TEST_SOURCE" "$TEST_TARGET"
PROFILE_TXT="# I am a .profile file"
echo "$PROFILE_TXT" > "tmp/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'" \
" Create symlink: $TEST_TARGET/.profile -> .dotfiles/profile"
assert "readlink '$TEST_TARGET/.profile'" ".dotfiles/profile"
assert "cat '$TEST_TARGET/.profile'" "$PROFILE_TXT"
rm "TEST_TARGET/.profile"
rm "$MY_DOTFILE"
# Remove temp files/folders used for locate-dotfile() tests.
rm "tmp/source/profile"
rmdir "tmp/source" "tmp/target" "tmp"
assert_end 'Integration: link action'