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