summaryrefslogtreecommitdiff
path: root/src/cmd/gofmt
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-11-16 18:44:21 -0500
committerRuss Cox <rsc@golang.org>2011-11-16 18:44:21 -0500
commite156d6ac548d5c920aacb3ebf950e338105d5632 (patch)
tree82b620eff4f1031c66baf97e0b911d4c845666aa /src/cmd/gofmt
parent48de98bc6ee9b7d6ff6f7e705c8191220588ea6e (diff)
downloadgo-e156d6ac548d5c920aacb3ebf950e338105d5632.tar.gz
gofmt: do not stop test.sh after 1 error
Fix bug377.go to be gofmt-compliant. R=gri, r, r CC=golang-dev http://codereview.appspot.com/5400045
Diffstat (limited to 'src/cmd/gofmt')
-rwxr-xr-xsrc/cmd/gofmt/test.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cmd/gofmt/test.sh b/src/cmd/gofmt/test.sh
index d130aee1a..2325d6b83 100755
--- a/src/cmd/gofmt/test.sh
+++ b/src/cmd/gofmt/test.sh
@@ -14,6 +14,7 @@ TMP1=test_tmp1.go
TMP2=test_tmp2.go
TMP3=test_tmp3.go
COUNT=0
+rm -f _failed
count() {
#echo $1
@@ -27,10 +28,9 @@ count() {
error() {
echo $1
- exit 1
+ touch _failed
}
-
# apply to one file
apply1() {
# the following files are skipped because they are test cases
@@ -157,6 +157,11 @@ runtests() {
runtests "$@"
cleanup
+if [ -f _failed ]; then
+ rm _failed
+ exit 1
+fi
+
# done
echo
echo "PASSED ($COUNT tests)"