]> Cypherpunks repositories - gostls13.git/commitdiff
gofmt: do not stop test.sh after 1 error
authorRuss Cox <rsc@golang.org>
Wed, 16 Nov 2011 23:44:21 +0000 (18:44 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 16 Nov 2011 23:44:21 +0000 (18:44 -0500)
Fix bug377.go to be gofmt-compliant.

R=gri, r, r
CC=golang-dev
https://golang.org/cl/5400045

src/cmd/gofmt/test.sh
test/fixedbugs/bug377.go

index d130aee1ace1c3ce4584add6470ea2f6422ab4d9..2325d6b8352c43daa4a8cd3ab21f0c862daed53b 100755 (executable)
@@ -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)"
index b6b5509fb6a9dadaaef40ccf0246de8ac57da4c2..e905e34d683f1e210db8a817c812bec2e16a4dc2 100644 (file)
@@ -6,4 +6,4 @@
 
 // Issue 1802
 
-ignored
+package ignored