Missing /g in a Quoter regex

This commit is contained in:
Brian Fraser
2012-11-10 09:54:39 -03:00
parent cafb2b3fb5
commit 57740c4101
3 changed files with 17 additions and 2 deletions

View File

@@ -89,6 +89,21 @@ is_deeply(
'splits with a db',
);
is_deeply(
[$q->split_unquote("`db`.`tb``l```")],
[qw(db tb`l`)],
'splits with a quoted db.tbl ad embedded quotes',
);
TODO: {
local $::TODO = "Embedded periods not yet supported";
is_deeply(
[$q->split_unquote("`d.b`.`tbl`")],
[qw(d.b tbl)],
'splits with embedded periods: `d.b`.`tbl`',
);
}
is( $q->literal_like('foo'), "'foo'", 'LIKE foo');
is( $q->literal_like('foo_bar'), "'foo\\_bar'", 'LIKE foo_bar');
is( $q->literal_like('foo%bar'), "'foo\\%bar'", 'LIKE foo%bar');