X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F05quotes.t;h=af408872f790c061225af85f8dc158ed5bf6e921;hb=41751122477eb5028a8849fe38ed59bf33fd522f;hp=105ee9481549636f8f2d2e661fba4b181039ed8b;hpb=b643abe1a7eb7e3e4ba89eb85ec27588daa8701a;p=dbsrgits%2FSQL-Abstract.git diff --git a/t/05quotes.t b/t/05quotes.t index 105ee94..af40887 100644 --- a/t/05quotes.t +++ b/t/05quotes.t @@ -3,19 +3,13 @@ use warnings; use vars qw($TESTING); $TESTING = 1; -use Test; +use Test::More; # use a BEGIN block so we print our plan before SQL::Abstract is loaded -BEGIN { plan tests => 4 } +BEGIN { plan tests => 7 } use SQL::Abstract; -sub is { - my ($got, $expect, $msg) = @_; - ok($got eq $expect) or - warn "got [${got}]\ninstead of [${expect}]\nfor test ${msg}\n\n"; -} - my $sql_maker = SQL::Abstract->new; $sql_maker->{quote_char} = '`'; @@ -75,13 +69,16 @@ is($sql, undef ); -#TODO: { -# local $TODO = "order_by with quoting needs fixing (ash/castaway)"; -# -# is($sql, -# q/SELECT `me`.`cdid`, `me`.`artist`, `me`.`title`, `me`.`year` FROM `cd` `me` ORDER BY `year` DESC/, -# 'quoted ORDER BY with DESC okay'); -#} + + +TODO: { + local $TODO = "order_by with quoting needs fixing (ash/castaway)"; + + is($sql, + q/SELECT `me`.`cdid`, `me`.`artist`, `me`.`title`, `me`.`year` FROM `cd` `me` ORDER BY `year` DESC/, + 'quoted ORDER BY with DESC okay'); +} + ($sql,) = $sql_maker->select( [