X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F05in_between.t;h=5bcbe554fa5fc159799ad20c79315bc47999a2a0;hb=7a5520f36acc6859ba89fae769e8841a937f6a2e;hp=3163aa69ead49869d94b16f5a4a12bb4df2372d7;hpb=33ee32dbe4e7d47074909d4afedb76d4cf7f3149;p=dbsrgits%2FSQL-Abstract.git diff --git a/t/05in_between.t b/t/05in_between.t index 3163aa6..5bcbe55 100644 --- a/t/05in_between.t +++ b/t/05in_between.t @@ -307,6 +307,31 @@ my @in_between_tests = ( bind => [ 2, 3, 4 ], test => 'Top level -between with useful LHS', }, + { + where => { + -in => [ + { -row => [ 'x', 'y' ] }, + { -row => [ 1, 2 ] }, + { -row => [ 3, 4 ] }, + ], + }, + stmt => ' WHERE (x, y) IN ((?, ?), (?, ?))', + bind => [ 1..4 ], + test => 'Complex top-level -in', + }, + { + where => { -is => [ 'bob', undef ] }, + stmt => ' WHERE bob IS NULL', + bind => [], + test => 'Top level -is ok', + }, + { + where => { -op => [ in => x => 1, 2, 3 ] }, + stmt => ' WHERE x IN (?, ?, ?)', + bind => [ 1, 2, 3 ], + test => 'Raw -op passes through correctly' + }, + ); for my $case (@in_between_tests) {