aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJason Hutchinson <zikes@zikes.me>2017-04-19 08:11:02 +0300
committerJason Hutchinson <zikes@zikes.me>2017-04-19 08:11:02 +0300
commitac3307400d06c98205e84823b913f40ac584680e (patch)
tree1844311be59c7cc490b562400f729a3542856e57 /test
parent192d634e08c428fb3ea82aefc3665dba941be3d8 (diff)
update go mock to allow for both version and env sub-commands
Diffstat (limited to 'test')
-rwxr-xr-xtest/segments/go_version.spec9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/segments/go_version.spec b/test/segments/go_version.spec
index 173086e0..a085f3b3 100755
--- a/test/segments/go_version.spec
+++ b/test/segments/go_version.spec
@@ -12,7 +12,14 @@ function setUp() {
}
function mockGo() {
- echo 'go version go1.5.3 darwin/amd64'
+ case "$1" in
+ 'version')
+ echo 'go version go1.5.3 darwin/amd64'
+ ;;
+ 'env')
+ echo "$HOME/go"
+ ;;
+ esac
}
function testGo() {