Merge pull request #234 from ghthor/fix-tests

Fix tests
This commit is contained in:
Wilhelmina Drengwitz
2018-08-31 09:12:18 -04:00
committed by GitHub

View File

@@ -21,6 +21,13 @@ fi
source "$scmbDir/test/support/test_helper.sh" source "$scmbDir/test/support/test_helper.sh"
source "$scmbDir/lib/scm_breeze.sh" source "$scmbDir/lib/scm_breeze.sh"
bin_path() {
if [ -n "${ZSH_VERSION:-}" ];
then where "$@" | tail -1
else which "$@"
fi
}
# Setup # Setup
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
oneTimeSetUp() { oneTimeSetUp() {
@@ -35,10 +42,10 @@ oneTimeSetUp() {
# Before aliasing, get original locations so we can compare them in the test # Before aliasing, get original locations so we can compare them in the test
unalias mv rm sed cat 2>/dev/null unalias mv rm sed cat 2>/dev/null
export mv_path="$(which mv)" export mv_path="$(bin_path mv)"
export rm_path="$(which rm)" export rm_path="$(bin_path rm)"
export sed_path="$(which sed)" export sed_path="$(bin_path sed)"
export cat_path="$(which cat)" export cat_path="$(bin_path cat)"
# Test aliases # Test aliases
alias mv="nocorrect $mv_path" alias mv="nocorrect $mv_path"