fix for x => { '!=' => [ -and => (1 .. 3) ] }
[dbsrgits/SQL-Abstract.git] / t / 04modifiers.t
old mode 100755 (executable)
new mode 100644 (file)
index 9a3349d..f4a0f1d
@@ -146,7 +146,7 @@ my @and_or_tests = (
   # test column multi-cond in arrayref (even more useful)
   {
     where => { x => { '!=' => [ -and => (1 .. 3) ] } },
-    stmt => 'WHERE x != ? AND x != ? AND x != ?',
+    stmt => 'WHERE ( ( x != ? AND x != ? AND x != ? ) )',
     bind => [1..3],
   },
 
@@ -155,8 +155,8 @@ my @and_or_tests = (
     where => { x => {
       -or => { '!=', 1, '>=', 2 }, -like => 'x%'
     }},
-    stmt => 'WHERE (x != ? OR x >= ?) AND x LIKE ?',
-    bind => [qw/1 2 x%/],
+    stmt => 'WHERE x LIKE ? AND ( x != ? OR x >= ? )',
+    bind => [qw/x% 1 2/],
   },
 
   # the -and should affect the OUTER arrayref, while the internal structures remain intact