Example #1
0
func (s *HelpersS) TestCheckMatchFailing(c *gocheck.C) {
	log := "helpers_test.go:[0-9]+ > helpers_test.go:[0-9]+:\n" +
		"\\.+ CheckMatch\\(value, expression\\):\n" +
		"\\.+ Value \\(string\\): \"foo\"\n" +
		"\\.+ Expected to match expression: \"bar\"\n\n"
	testHelperFailure(c, "CheckMatch('foo', 'bar')", false, false, log,
		func() interface{} {
			return c.CheckMatch("foo", "bar")
		})
}
Example #2
0
func (s *HelpersS) TestCheckMatchSucceeding(c *gocheck.C) {
	testHelperSuccess(c, "CheckErr('foo', 'fo*')", true, func() interface{} {
		return c.CheckMatch("foo", "fo*")
	})
}