(c *gc.C)
| 62 | } |
| 63 | |
| 64 | func (s *ExprSuite) TestLikeExpr(c *gc.C) { |
| 65 | expr := LikeL(table1Col1, EscapeForLike("%my_prefix")+"%") |
| 66 | |
| 67 | buf := &bytes.Buffer{} |
| 68 | |
| 69 | err := expr.SerializeSql(buf) |
| 70 | c.Assert(err, gc.IsNil) |
| 71 | |
| 72 | sql := buf.String() |
| 73 | c.Assert( |
| 74 | sql, |
| 75 | gc.Equals, |
| 76 | "`table1`.`col1` LIKE '\\%my\\_prefix%'") |
| 77 | |
| 78 | } |
| 79 | |
| 80 | func (s *ExprSuite) TestRegexExpr(c *gc.C) { |
| 81 | expr := RegexpL(table1Col1, "[[:<:]]log|[[.low-line.]]log") |
nothing calls this directly
no test coverage detected