summaryrefslogtreecommitdiff
path: root/test/nul1.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-08-16 11:14:26 -0400
committerRuss Cox <rsc@golang.org>2011-08-16 11:14:26 -0400
commit7a251687c029ee915573f767f57ab17372b3c134 (patch)
tree9c51f39075a2500498a8e73a399c95b141a6205d /test/nul1.go
parent8a6ab1ccb1aaf1d5d69fbe6bce24139458da6122 (diff)
downloadgo-7a251687c029ee915573f767f57ab17372b3c134.tar.gz
errchk: allow multiple patterns
// ERROR "pattern1" "pattern2" means that there has to be one or more lines matching pattern1 and then excluding those, there have to be one or more lines matching pattern2. So if you expect two different error messages from a particular line, writing two separate patterns checks that both errors are produced. Also, errchk now flags lines that produce more errors than expected. Before, as long as at least one error matched the pattern, all the others were ignored. Revise tests to expect or silence these additional errors. R=lvd, r, iant CC=golang-dev http://codereview.appspot.com/4869044
Diffstat (limited to 'test/nul1.go')
-rw-r--r--test/nul1.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/nul1.go b/test/nul1.go
index 9cf51125b..142d4deb1 100644
--- a/test/nul1.go
+++ b/test/nul1.go
@@ -39,7 +39,7 @@ var y = ` + "`in raw string \x00 foo`" + ` // ERROR "NUL"
/* in other comment ` + "\x00" + ` */ // ERROR "NUL"
-/* in source code */ ` + "\x00" + `// ERROR "NUL"
+/* in source code */ ` + "\x00" + `// ERROR "NUL" "illegal character"
var xx = "in string ` + "\xc2\xff" + `" // ERROR "UTF-8"
@@ -50,9 +50,9 @@ var yy = ` + "`in raw string \xff foo`" + ` // ERROR "UTF-8"
/* in other comment ` + "\xe0\x00\x00" + ` */ // ERROR "UTF-8|NUL"
/* in variable name */
-var z` + "\xc1\x81" + ` int // ERROR "UTF-8"
+var z` + "\xc1\x81" + ` int // ERROR "UTF-8" "invalid identifier character"
-/* in source code */ ` + "\xc2A" + `// ERROR "UTF-8"
+/* in source code */ ` + "var \xc2A int" + `// ERROR "UTF-8" "invalid identifier character"
`)
}