Home | History | Annotate | Download | only in regexp

Lines Matching refs:pattern

137 	pattern, replacement, input, output string
141 // Test empty input and/or replacement, with pattern that matches the empty string.
147 // Test empty input and/or replacement, with pattern that does not match the empty string.
252 pattern string
265 re, err := Compile(tc.pattern)
267 t.Errorf("Unexpected error compiling %q: %v", tc.pattern, err)
273 tc.pattern, tc.input, tc.replacement, actual, tc.output)
279 tc.pattern, tc.input, tc.replacement, actual, tc.output)
290 re, err := Compile(tc.pattern)
292 t.Errorf("Unexpected error compiling %q: %v", tc.pattern, err)
298 tc.pattern, tc.input, tc.replacement, actual, tc.output)
304 tc.pattern, tc.input, tc.replacement, actual, tc.output)
310 re, err := Compile(tc.pattern)
312 t.Errorf("Unexpected error compiling %q: %v", tc.pattern, err)
318 tc.pattern, tc.input, tc.replacement, actual, tc.output)
324 tc.pattern, tc.input, tc.replacement, actual, tc.output)
331 re, err := Compile(tc.pattern)
333 t.Errorf("Unexpected error compiling %q: %v", tc.pattern, err)
339 tc.pattern, tc.input, actual, tc.output)
345 tc.pattern, tc.input, actual, tc.output)
351 pattern, output, literal string
380 quoted := QuoteMeta(tc.pattern)
383 tc.pattern, quoted, tc.output)
389 if tc.pattern != "" {
392 t.Errorf("Unexpected error compiling QuoteMeta(`%s`): %v", tc.pattern, err)
395 src := "abc" + tc.pattern + "def"
401 tc.pattern, src, repl, replaced, expected)
409 // Literal method needs to scan the pattern.
410 re := MustCompile(tc.pattern)
413 t.Errorf("LiteralPrefix(`%s`) = %t; want %t", tc.pattern, complete, tc.isLiteral)
416 t.Errorf("LiteralPrefix(`%s`) = `%s`; want `%s`", tc.pattern, str, tc.literal)