+2011-09-23 Ian Lance Taylor <iant@google.com>
+
+ * go.test/go-test.exp (errchk): Handle more cases of getting
+ correct Tcl backslash quoting in regular expressions in test file.
+
2011-09-23 Jason Merrill <jason@redhat.com>
Core 234
# experimentation, not analysis.
regsub -all "\\.\\*" $out_line "\\\\\[ -~\\\\\]*" out_line
}
+ if [string match "*dg-error*\\\[?\\\]*" $out_line] {
+ set index [string first "dg-error" $out_line]
+ regsub -all "\\\[\(.\)\\\]" $out_line "\\\\\[\\1\\\\\]" out_line
+ }
if [string match "*dg-error*\{*" $out_line] {
set index [string first "dg-error" $out_line]
- regsub -start $index -all "\{" $out_line "\\\\\[\\\{\\\\\]" out_line
+ regsub -start $index -all "\(\[^\\\\]\)\{" $out_line "\\1\\\\\[\\\{\\\\\]" out_line
}
if [string match "*dg-error*\}*\}" $out_line] {
set index [string first "dg-error" $out_line]
- regsub -start $index -all "\}\(.\)" $out_line "\\\\\[\\\}\\\\\]\\1" out_line
+ regsub -start $index -all "\(\[^\\\\]\)\}\(.\)" $out_line "\\1\\\\\[\\\}\\\\\]\\2" out_line
}
if [string match "*dg-error*\(*" $out_line] {
set index [string first "dg-error" $out_line]
set index [string first "dg-error" $out_line]
regsub -start $index -all "\\\\\\\)\(.\)" $out_line "\\\\\[\\\)\\\\\]\\1" out_line
}
- if [string match "*dg-error*\[.\]*" $out_line] {
- set index [string first "dg-error" $out_line]
- regsub -all "\\\[\\.\\\]" $out_line "\\\\\[.\\\\\]" out_line
- }
# Special case for bug332, in which the error message wants to
# match the file name, which is not what dg-error expects.
if [string match "*dg-error*bug332*" $out_line] {
func main() {
var x interface{}
- switch t := x.(type) { // ERROR "0 is not a type"
- case 0:
- t.x = 1 // ERROR "type interface \{ \}"
+ switch t := x.(type) { // GC_ERROR "0 is not a type"
+ case 0: // GCCGO_ERROR "expected type"
+ t.x = 1 // ERROR "type interface \{ \}|reference to undefined field or method"
}
}
type T int
-func (T) m() {}
-func (T) m() {} // ERROR "T[.]m redeclared"
+func (T) m() {} // GCCGO_ERROR "previous"
+func (T) m() {} // ERROR "T[.]m redeclared|redefinition"
-func (*T) p() {}
-func (*T) p() {} // ERROR "[(][*]T[)][.]p redeclared"
+func (*T) p() {} // GCCGO_ERROR "previous"
+func (*T) p() {} // ERROR "[(][*]T[)][.]p redeclared|redefinition"