mirror of
https://github.com/golang/go
synced 2024-11-24 21:00:09 -07:00
regexp: add explicit test for bytes version of match function
This commit is contained in:
parent
0fd7be7ee5
commit
560c3afed1
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user