Lines Matching refs:pattern
31 pattern string // regexp that log output must match; we add ^ and expected_text$ always
51 func testPrint(t *testing.T, flag int, prefix string, pattern string, useFormat bool) {
63 pattern = "^" + pattern + "hello 23 world$"
64 matched, err4 := regexp.MatchString(pattern, line)
66 t.Fatal("pattern did not compile:", err4)
69 t.Errorf("log output should match %q is %q", pattern, line)
76 testPrint(t, testcase.flag, testcase.prefix, testcase.pattern, false)
77 testPrint(t, testcase.flag, testcase.prefix, testcase.pattern, true)
125 pattern := "^Reality:" + Rdate + " " + Rtime + Rmicroseconds + " hello\n"
126 matched, err := regexp.Match(pattern, b.Bytes())
128 t.Fatalf("pattern %q did not compile: %s", pattern, err)
131 t.Error("message did not match pattern")