The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
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;