require explicit restoration of old unop behaviour except for special ops
[scpubgit/Q-Branch.git] / t / 02where.t
index 1b0ac92..204a8fd 100644 (file)
@@ -335,12 +335,12 @@ my @handle_tests = (
 # Op against random functions (these two are oracle-specific)
    {
        where => { timestamp => { '!=' => { -trunc => { -year => \'sysdate' } } } },
-       stmt => " WHERE ( timestamp != TRUNC (YEAR sysdate) )",
+       stmt => " WHERE ( timestamp != TRUNC(YEAR(sysdate)) )",
        bind => [],
    },
    {
        where => { timestamp => { '>=' => { -to_date => '2009-12-21 00:00:00' } } },
-       stmt => " WHERE ( timestamp >= TO_DATE ? )",
+       stmt => " WHERE ( timestamp >= TO_DATE(?) )",
        bind => ['2009-12-21 00:00:00'],
    },
 
@@ -408,6 +408,11 @@ my @handle_tests = (
         stmt => '',
         bind => [ ],
     },
+    {
+        where => { '=' => \'bozz' },
+        stmt => 'WHERE = bozz',
+        bind => [ ],
+    },
 );
 
 for my $case (@handle_tests) {