[Bast-commits] r7717 - in SQL-Abstract/1.x/trunk: lib/SQL/Abstract t
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Tue Sep 22 07:55:36 GMT 2009
Author: ribasushi
Date: 2009-09-22 07:55:36 +0000 (Tue, 22 Sep 2009)
New Revision: 7717
Modified:
SQL-Abstract/1.x/trunk/lib/SQL/Abstract/Test.pm
SQL-Abstract/1.x/trunk/t/10test.t
Log:
IN testing support
Modified: SQL-Abstract/1.x/trunk/lib/SQL/Abstract/Test.pm
===================================================================
--- SQL-Abstract/1.x/trunk/lib/SQL/Abstract/Test.pm 2009-09-22 07:18:02 UTC (rev 7716)
+++ SQL-Abstract/1.x/trunk/lib/SQL/Abstract/Test.pm 2009-09-22 07:55:36 UTC (rev 7717)
@@ -59,6 +59,7 @@
# _recurse_parse()
my @binary_op_keywords = (
(map { "\Q$_\E" } (qw/< > != = <= >=/)),
+ '(?: NOT \s+)? IN',
'(?: NOT \s+)? LIKE',
'(?: NOT \s+)? BETWEEN',
);
Modified: SQL-Abstract/1.x/trunk/t/10test.t
===================================================================
--- SQL-Abstract/1.x/trunk/t/10test.t 2009-09-22 07:18:02 UTC (rev 7716)
+++ SQL-Abstract/1.x/trunk/t/10test.t 2009-09-22 07:55:36 UTC (rev 7717)
@@ -268,7 +268,16 @@
},
{
equal => 0,
+ parenthesis_significant => 1,
statements => [
+ q/SELECT foo FROM bar WHERE a IN (1,2,3)/,
+ q/SELECT foo FROM bar WHERE a IN (1,3,2)/,
+ q/SELECT foo FROM bar WHERE a IN ((1,2,3))/,
+ ]
+ },
+ {
+ equal => 0,
+ statements => [
# BETWEEN with/without parenthesis around itself/RHS is a sticky business
# if I made a mistake here, simply rewrite the special BETWEEN handling in
# _recurse_parse()
More information about the Bast-commits
mailing list