attempt to make travis happy

pull/1284/head
cornfeedhobo 2019-06-27 23:04:38 -05:00
parent cb1011d8f1
commit 408693f48a
No known key found for this signature in database
GPG Key ID: 724357093F994B26
1 changed files with 26 additions and 2 deletions

View File

@ -5,14 +5,38 @@ load ../../lib/helpers
load ../../lib/composure
load ../../plugins/available/go.plugin
function local_setup {
mkdir -p "$BASH_IT"
lib_directory="$(cd "$(dirname "$0")" && pwd)"
# Use rsync to copy Bash-it to the temp folder
# rsync is faster than cp, since we can exclude the large ".git" folder
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../../.. "$BASH_IT"
rm -rf "$BASH_IT"/enabled
rm -rf "$BASH_IT"/aliases/enabled
rm -rf "$BASH_IT"/completion/enabled
rm -rf "$BASH_IT"/plugins/enabled
mkdir -p "$BASH_IT"/enabled
mkdir -p "$BASH_IT"/aliases/enabled
mkdir -p "$BASH_IT"/completion/enabled
mkdir -p "$BASH_IT"/plugins/enabled
export OLD_PATH="$PATH"
export PATH="/usr/bin:/bin:/usr/sbin"
}
function local_teardown {
export PATH="$OLD_PATH"
unset OLD_PATH
}
@test 'plugins go: single entry in GOPATH' {
export GOROOT='/baz'
export GOPATH='/foo'
load ../../plugins/available/go.plugin
assert_equal $PATH 'foobar'
assert_equal $(cut -d':' -f1,2 <<<$PATH | tr -d '\n') '/foo/bin:/baz/bin'
assert_equal $(cut -d':' -f1,2 <<<$PATH) '/foo/bin:/baz/bin'
}
@test 'plugins go: single entry in GOPATH, with space' {