SQLT::Parser::PostgreSQL parses table def with default values
[dbsrgits/SQL-Translator.git] / t / 65-producerutils.t
CommitLineData
f3fccb75 1use strict;
2use warnings;
3
4use Test::More;
5
6use SQL::Translator::ProducerUtils;
7
8my $util = SQL::Translator::ProducerUtils->new(
9 quote_chars => ['[', ']'],
10);
11
12is $util->quote('frew'), '[frew]', 'simple quote works';
13is $util->quote('people.frew'), '[people].[frew]', 'namespaced quote works';
14
15my $single_util = SQL::Translator::ProducerUtils->new(
16 quote_chars => q(|),
17);
18
19is $single_util->quote('frew'), '|frew|', 'simple single quote works';
20is $single_util->quote('people.frew'), '|people|.|frew|', 'namespaced single quote works';
21
22my $no_util = SQL::Translator::ProducerUtils->new();
23
24is $no_util->quote('frew'), 'frew', 'simple no quote works';
25is $no_util->quote('people.frew'), 'people.frew', 'namespaced no quote works';
26
27done_testing;