X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fsearch%2Fstack_cond.t;h=497b69834ad82b94b4deae23fe07df349826292e;hb=591df363660658ed30e60438c5251ca480925a6f;hp=d43f274c95be5d60a7888573613deb047ba178c8;hpb=135ac69ddafd158cbfa4082871599ee104bbd205;p=dbsrgits%2FDBIx-Class.git diff --git a/t/search/stack_cond.t b/t/search/stack_cond.t index d43f274..497b698 100644 --- a/t/search/stack_cond.t +++ b/t/search/stack_cond.t @@ -1,14 +1,14 @@ +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } + use strict; use warnings; use Test::More; -use lib qw(t/lib); + +use DBIx::Class::_Util 'dump_value'; use DBICTest ':DiffSQL'; use SQL::Abstract qw(is_plain_value is_literal_value); use List::Util 'shuffle'; -use Data::Dumper; -$Data::Dumper::Terse = 1; -$Data::Dumper::Useqq = 1; $Data::Dumper::Indent = 0; my $schema = DBICTest->init_schema(); @@ -50,9 +50,9 @@ for my $c ( if (my $v = is_plain_value($c->{cond})) { push @query_steps, - { year => $v->[0] }, - { title => $v->[0] }, - { -and => [ year => $v->[0], title => $v->[0] ] }, + { year => $$v }, + { title => $$v }, + { -and => [ year => $$v, title => $$v ] }, ; } @@ -85,7 +85,7 @@ for my $c ( year $c->{sql} )", \@bind, - 'Double condition correctly collapsed for steps' . Dumper \@query_steps, + 'Double condition correctly collapsed for steps' . dump_value \@query_steps, ); }