[Bast-commits] r9688 - SQL-Abstract/1.x/trunk/t
frew at dev.catalyst.perl.org
frew at dev.catalyst.perl.org
Mon Sep 6 16:32:44 GMT 2010
Author: frew
Date: 2010-09-06 17:32:44 +0100 (Mon, 06 Sep 2010)
New Revision: 9688
Added:
SQL-Abstract/1.x/trunk/t/12format_keyword.t
Log:
test coloring of keyword
Added: SQL-Abstract/1.x/trunk/t/12format_keyword.t
===================================================================
--- SQL-Abstract/1.x/trunk/t/12format_keyword.t (rev 0)
+++ SQL-Abstract/1.x/trunk/t/12format_keyword.t 2010-09-06 16:32:44 UTC (rev 9688)
@@ -0,0 +1,25 @@
+use strict;
+use warnings;
+
+use Test::More;
+use SQL::Abstract::Tree;
+
+my $sqlat = SQL::Abstract::Tree->new({
+ colormap => {
+ select => ['s(', ')s'],
+ where => ['w(', ')w'],
+ from => ['f(', ')f'],
+ join => ['j(', ')f'],
+ on => ['o(', ')o'],
+ 'group by' => ['gb(',')gb'],
+ 'order by' => ['ob(',')ob'],
+ },
+});
+
+for ( keys %{$sqlat->colormap}) {
+ my ($l, $r) = @{$sqlat->colormap->{$_}};
+ is($sqlat->format_keyword($_), "$l$_$r", "$_ 'colored' correctly");
+}
+
+
+done_testing;
More information about the Bast-commits
mailing list