Commit | Line | Data |
110674e1 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use Test::More; |
5 | use SQL::Abstract::Tree; |
6 | |
7 | my $sqlat = SQL::Abstract::Tree->new({ |
f2a0d52b |
8 | colormap => { |
9 | select => ['s(', ')s'], |
10 | where => ['w(', ')w'], |
11 | from => ['f(', ')f'], |
12 | join => ['j(', ')f'], |
13 | on => ['o(', ')o'], |
14 | 'group by' => ['gb(',')gb'], |
15 | 'order by' => ['ob(',')ob'], |
16 | }, |
110674e1 |
17 | }); |
18 | |
19 | for ( keys %{$sqlat->colormap}) { |
f2a0d52b |
20 | my ($l, $r) = @{$sqlat->colormap->{$_}}; |
21 | is($sqlat->format_keyword($_), "$l$_$r", "$_ 'colored' correctly"); |
110674e1 |
22 | } |
23 | |
24 | |
25 | done_testing; |