diff --git a/src/regexp/all_test.go b/src/regexp/all_test.go index 52de3fef83d..7a4934b8792 100644 --- a/src/regexp/all_test.go +++ b/src/regexp/all_test.go @@ -107,6 +107,11 @@ func matchFunctionTest(t *testing.T, test *FindTest) { if m != (len(test.matches) > 0) { t.Errorf("Match failure on %s: %t should be %t", test, m, len(test.matches) > 0) } + // now try bytes + m, err = Match(test.pat, []byte(test.text)) + if m != (len(test.matches) > 0) { + t.Errorf("Match failure on %s: %t should be %t", test, m, len(test.matches) > 0) + } } func TestMatchFunction(t *testing.T) {