Fix behavoiur of * in names
[dbsrgits/SQL-Abstract-2.0-ish.git] / t / 003_quote.t
CommitLineData
8eda2119 1use strict;
2use warnings;
3
8b398780 4use Test::More tests => 5;
8eda2119 5use Test::Exception;
6
7use_ok('SQL::Abstract') or BAIL_OUT( "$@" );
8
9my $sqla = SQL::Abstract->create(1);
10
11lives_ok {
12 $sqla->quote_chars('[]');
13} "coercion of quote_chars from Str works";
8b398780 14
15
16is $sqla->dispatch( { -type => 'name', args => [qw/me id/] }),
17 "[me].[id]",
18 "me.id";
19
20
21is $sqla->dispatch( { -type => 'name', args => [qw/me */] }),
22 "[me].*",
23 "me.*";
24
25
26is $sqla->dispatch( { -type => 'name', args => [qw/*/] }),
27 "*",
28 "*";