X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F04modifiers.t;h=355ef67c8dd8d17f9a15df375ebe4de850eaeb2e;hb=0769ac0e4022d40ded0dff13abe292d4867c9d09;hp=dfc0f780ab479efb63252e3134bc1f1b291cd36a;hpb=01a01e578da5a9743771d793d81dcbbb7f965183;p=dbsrgits%2FSQL-Abstract.git diff --git a/t/04modifiers.t b/t/04modifiers.t index dfc0f78..355ef67 100644 --- a/t/04modifiers.t +++ b/t/04modifiers.t @@ -7,6 +7,7 @@ use Test::Exception; use SQL::Abstract::Test import => ['is_same_sql_bind']; use Data::Dumper; +use Storable qw/dclone/; use SQL::Abstract; =begin @@ -371,7 +372,7 @@ my @nest_tests = ( }, ); -plan tests => @and_or_tests*3 + @numbered_mods*4 + @nest_tests*2; +plan tests => @and_or_tests*4 + @numbered_mods*4 + @nest_tests*2; for my $case (@and_or_tests) { TODO: { @@ -381,7 +382,10 @@ for my $case (@and_or_tests) { my @w; local $SIG{__WARN__} = sub { push @w, @_ }; + my $sql = SQL::Abstract->new ($case->{args} || {}); + my $where_copy = dclone($case->{where}); + lives_ok (sub { my ($stmt, @bind) = $sql->where($case->{where}); is_same_sql_bind( @@ -394,6 +398,8 @@ for my $case (@and_or_tests) { }); is (@w, 0, 'No warnings within and-or tests') || diag join "\n", 'Emitted warnings:', @w; + + is_deeply ($case->{where}, $where_copy, 'Where conditions unchanged'); } }