From 213a88f62f249dd815f3f4156d724032991a418f Mon Sep 17 00:00:00 2001 From: James Shubin Date: Sun, 4 Dec 2016 21:11:36 -0500 Subject: [PATCH] misc: Improve gofmt test case Add new golang versions, and fail if one is not found. --- test/test-gofmt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test-gofmt.sh b/test/test-gofmt.sh index 3ec66e6a..41dfed7e 100755 --- a/test/test-gofmt.sh +++ b/test/test-gofmt.sh @@ -9,9 +9,9 @@ ROOT=$(dirname "${BASH_SOURCE}")/.. GO_VERSION=($(go version)) -if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.2|go1.3|go1.4|go1.5|go1.6') ]]; then - echo "Unknown go version '${GO_VERSION}', skipping gofmt." - exit 0 +if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.2|go1.3|go1.4|go1.5|go1.6|go1.7|go1.8') ]]; then + echo "Unknown go version '${GO_VERSION[2]}', failing gofmt." + exit 1 fi cd "${ROOT}"