Skip to content

Commit

Permalink
Add test case for LIKE ... ESCAPE.
Browse files Browse the repository at this point in the history
  • Loading branch information
julianhyde committed Oct 15, 2014
1 parent a47ed3e commit ececfc9
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2980,6 +2980,14 @@ protected static Calendar getCalendarNotTooNear(int timeUnit) {
tester.checkBoolean("'abc' not like '_b_'", Boolean.FALSE);
}

@Test public void testLikeEscape() {
tester.setFor(SqlStdOperatorTable.LIKE);
tester.checkBoolean("'a_c' like 'a#_c' escape '#'", Boolean.TRUE);
tester.checkBoolean("'axc' like 'a#_c' escape '#'", Boolean.FALSE);
tester.checkBoolean("'a_c' like 'a\\_c' escape '\\'", Boolean.TRUE);
tester.checkBoolean("'axc' like 'a\\_c' escape '\\'", Boolean.FALSE);
}

@Test public void testLikeOperator() {
tester.setFor(SqlStdOperatorTable.LIKE);
tester.checkBoolean("'' like ''", Boolean.TRUE);
Expand Down

0 comments on commit ececfc9

Please sign in to comment.