From: Norbert Buchmuller Date: Mon, 10 Nov 2008 23:04:10 +0000 (+0000) Subject: Added two more quoting tests for the 'colA DESC' stuff - to document the expected... X-Git-Tag: v1.70~266 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=71519cf6bf838cd5774b5eccba373c178140f5bc;p=dbsrgits%2FSQL-Abstract.git Added two more quoting tests for the 'colA DESC' stuff - to document the expected behaviour. --- diff --git a/t/06order_by.t b/t/06order_by.t index 0d922ae..63bde18 100644 --- a/t/06order_by.t +++ b/t/06order_by.t @@ -19,11 +19,21 @@ my @cases = expects => ' ORDER BY colA', expects_quoted => ' ORDER BY `colA`', }, + { # it may look odd, but this is the desired behaviour (mst) + given => 'colA DESC', + expects => ' ORDER BY colA DESC', + expects_quoted => ' ORDER BY `colA DESC`', + }, { given => [qw/colA colB/], expects => ' ORDER BY colA, colB', expects_quoted => ' ORDER BY `colA`, `colB`', }, + { # it may look odd, but this is the desired behaviour (mst) + given => ['colA ASC', 'colB DESC'], + expects => ' ORDER BY colA ASC, colB DESC', + expects_quoted => ' ORDER BY `colA ASC`, `colB DESC`', + }, { given => {-asc => 'colA'}, expects => ' ORDER BY colA ASC',