From ac3307400d06c98205e84823b913f40ac584680e Mon Sep 17 00:00:00 2001 From: Jason Hutchinson Date: Wed, 19 Apr 2017 00:11:02 -0500 Subject: [PATCH] update go mock to allow for both version and env sub-commands --- test/segments/go_version.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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() {