aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/exp/template/parse_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/exp/template/parse_test.go')
-rw-r--r--src/pkg/exp/template/parse_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkg/exp/template/parse_test.go b/src/pkg/exp/template/parse_test.go
index 70c9f5a64c..34b0da6ebf 100644
--- a/src/pkg/exp/template/parse_test.go
+++ b/src/pkg/exp/template/parse_test.go
@@ -5,11 +5,12 @@
package template
import (
+ "flag"
"fmt"
"testing"
)
-const dumpErrors = true
+var debug = flag.Bool("debug", false, "show the errors produced by the tests")
type numberTest struct {
text string
@@ -193,7 +194,7 @@ func TestParse(t *testing.T) {
continue
case err != nil && !test.ok:
// expected error, got one
- if dumpErrors {
+ if *debug {
fmt.Printf("%s: %s\n\t%s\n", test.name, test.input, err)
}
continue