LEFT | RIGHT |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright 2012 The Go Authors. All rights reserved. | 2 # Copyright 2012 The Go Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style | 3 # Use of this source code is governed by a BSD-style |
4 # license that can be found in the LICENSE file. | 4 # license that can be found in the LICENSE file. |
5 | 5 |
6 set -e | 6 set -e |
7 go build -o testgo | 7 go build -o testgo |
8 | 8 |
9 ok=true | 9 ok=true |
10 | 10 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 # issue 4104 | 139 # issue 4104 |
140 if [ $(./testgo test fmt fmt fmt fmt fmt | wc -l) -ne 1 ] ; then | 140 if [ $(./testgo test fmt fmt fmt fmt fmt | wc -l) -ne 1 ] ; then |
141 echo 'go test fmt fmt fmt fmt fmt tested the same package multiple times' | 141 echo 'go test fmt fmt fmt fmt fmt tested the same package multiple times' |
142 ok=false | 142 ok=false |
143 fi | 143 fi |
144 | 144 |
145 # ensure that output of 'go list' is consistent between runs | 145 # ensure that output of 'go list' is consistent between runs |
146 ./testgo list std > test_std.list | 146 ./testgo list std > test_std.list |
147 if ! ./testgo list std | cmp -s test_std.list - ; then | 147 if ! ./testgo list std | cmp -s test_std.list - ; then |
148 » echo "go list std doesn't show in consistent order" | 148 » echo "go list std ordering is inconsistent" |
149 ok=false | 149 ok=false |
150 fi | 150 fi |
151 rm -f test_std.list | 151 rm -f test_std.list |
152 | 152 |
153 # clean up | 153 # clean up |
154 rm -rf testdata/bin | 154 rm -rf testdata/bin testdata/bin1 |
155 rm -f testgo | 155 rm -f testgo |
156 | 156 |
157 if $ok; then | 157 if $ok; then |
158 echo PASS | 158 echo PASS |
159 else | 159 else |
160 echo FAIL | 160 echo FAIL |
161 exit 1 | 161 exit 1 |
162 fi | 162 fi |
LEFT | RIGHT |