X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F01generate.t;fp=t%2F01generate.t;h=cae9f9a44f7d3c2cde02ab3ac4072532e4bbb0c4;hb=ac8527192722e529e66e3858df2b4cbb6ae478c7;hp=ebe3aad95ebc7bc747f9ed6ee982fd6756d8671b;hpb=063097a3664cfb4dce6ceaa832209c71a1892dbe;p=dbsrgits%2FSQL-Abstract.git diff --git a/t/01generate.t b/t/01generate.t index ebe3aad..cae9f9a 100644 --- a/t/01generate.t +++ b/t/01generate.t @@ -616,6 +616,27 @@ my @tests = ( stmt_q => 'DELETE FROM `test` WHERE ( `requestor` IS NULL ) RETURNING `id`, `created_at`', bind => [] }, + { + func => 'select', + args => [\['my_srf(?)', 42], [qw(foo bar)], {foo => 37}], + stmt => 'select foo, bar from my_srf(?) where foo = ?', + stmt_q => 'select `foo`, `bar` from my_srf(?) where `foo` = ?', + bind => [42, 37], + }, + { + func => 'delete', + args => [\['my_srf(?)', 42], {foo => 37}], + stmt => 'delete from my_srf(?) where foo = ?', + stmt_q => 'delete from my_srf(?) where `foo` = ?', + bind => [42, 37], + }, + { + func => 'update', + args => [\['my_srf(?)', 42], {foo => 37}, {bar => 53}], + stmt => 'update my_srf(?) set foo = ? where bar = ?', + stmt_q => 'update my_srf(?) set `foo` = ? where `bar` = ?', + bind => [42, 37, 53], + }, ); # check is( not) => undef