Skip to content

Commit

Permalink
test: Fix homeshick_dir suite
Browse files Browse the repository at this point in the history
  • Loading branch information
andsens committed Sep 6, 2020
1 parent 9eccd65 commit df350ed
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/suites/homeshick_dir.bats
Expand Up @@ -6,22 +6,21 @@ load ../helper
castle 'dotfiles'
local result
result=$( HOMESHICK_DIR=$_TMPDIR/nowhere "$HOMESHICK_FN" 2>&1 >/dev/null ) || true
[[ "$result" =~ "/nowhere/" ]]
[[ "$result" =~ "/nowhere/" ]] || false
}

@test 'fish with homeshick_dir override' {
[ "$(type -t fish)" = "file" ] || skip "fish not installed"
cmd="source \"$HOMESHICK_FN_SRC_FISH\"; set HOMESHICK_DIR \"$_TMPDIR/nowhere\"; $HOMESHICK_FN"
local result
result=$( fish <<< "$cmd" 2>&1 >/dev/null )
[[ "$result" =~ "/nowhere/" ]]
result=$( fish <<< "$cmd" 2>&1 >/dev/null ) || true
[[ "$result" =~ "/nowhere/" ]] || false
}

@test 'csh with homeshick_dir override' {
[ "$(type -t csh)" = "file" ] || skip "csh not installed"
cmd="set HOMESHICK_DIR=/nowhere; source \"${HOMESHICK_FN_SRC_CSH}\""
local result
result=$( csh <<< "$cmd" 2>&1 >/dev/null )
[[ "$result" =~ "/nowhere/" ]]
[[ "$result" =~ "/nowhere/" ]] || false
}

0 comments on commit df350ed

Please sign in to comment.