Fix behavoiur of * in names
[dbsrgits/SQL-Abstract-2.0-ish.git] / t / 003_quote.t
index 61df9dc..6f26fb6 100644 (file)
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
  
-use Test::More tests => 2;
+use Test::More tests => 5;
 use Test::Exception;
  
 use_ok('SQL::Abstract') or BAIL_OUT( "$@" );
@@ -11,3 +11,18 @@ my $sqla = SQL::Abstract->create(1);
 lives_ok {
   $sqla->quote_chars('[]');
 } "coercion of quote_chars from Str works";
+
+
+is $sqla->dispatch( { -type => 'name', args => [qw/me id/] }), 
+   "[me].[id]",
+   "me.id";
+
+
+is $sqla->dispatch( { -type => 'name', args => [qw/me */] }), 
+   "[me].*",
+   "me.*";
+
+
+is $sqla->dispatch( { -type => 'name', args => [qw/*/] }), 
+   "*",
+   "*";