X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F07subqueries.t;h=7d5fbd4e66f8fe77ffc9b7d0a8bf0266e7ba914c;hb=cf5b7ab163f8ac123ebc9bb1156e79646cd5bd2f;hp=df90bdf8b8c048309e7236ba96c74afa29998ce0;hpb=48d9f5f846e7f9e8f51110ad418a3bb4b50c31f9;p=scpubgit%2FQ-Branch.git diff --git a/t/07subqueries.t b/t/07subqueries.t index df90bdf..7d5fbd4 100644 --- a/t/07subqueries.t +++ b/t/07subqueries.t @@ -1,5 +1,3 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More; @@ -36,7 +34,7 @@ push @tests, { #2 ($sub_stmt, @sub_bind) - = $sql->select("t1", "c1", {c2 => {"<" => 100}, + = $sql->select("t1", "c1", {c2 => {"<" => 100}, c3 => {-like => "foo%"}}); $where = { foo => 1234, @@ -49,7 +47,7 @@ push @tests, { }; #3 -($sub_stmt, @sub_bind) +($sub_stmt, @sub_bind) = $sql->select("t1", "*", {c1 => 1, c2 => \"> t0.c0"}); $where = { foo => 1234, @@ -73,7 +71,7 @@ push @tests, { #5 -($sub_stmt, @sub_bind) +($sub_stmt, @sub_bind) = $sql->where({age => [{"<" => 10}, {">" => 20}]}); $sub_stmt =~ s/^ where //i; # don't want "WHERE" in the subclause $where = { @@ -99,16 +97,10 @@ push @tests, { bind => [100, "foo%", 1234], }; - -plan tests => scalar(@tests); - for (@tests) { my($stmt, @bind) = $sql->where($_->{where}, $_->{order}); is_same_sql_bind($stmt, \@bind, $_->{stmt}, $_->{bind}); } - - - - +done_testing;