From: Dagfinn Ilmari Mannsåker Date: Mon, 30 Jun 2014 17:58:45 +0000 (+0100) Subject: Test table and field names with quote characters in them X-Git-Tag: v0.11021~16^2~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4d6f8a80c017422501b30941777ec14f91a7e10c;p=dbsrgits%2FSQL-Translator.git Test table and field names with quote characters in them --- diff --git a/t/60roundtrip.t b/t/60roundtrip.t index f04417f..9079406 100644 --- a/t/60roundtrip.t +++ b/t/60roundtrip.t @@ -92,7 +92,7 @@ my $base_file = "$Bin/data/roundtrip_autogen.yaml"; open (my $base_fh, '<', $base_file) or die "$base_file: $!"; my $base_t = SQL::Translator->new; -$base_t->$_ (1) for qw/add_drop_table no_comments/; +$base_t->$_ (1) for qw/add_drop_table no_comments quote_identifiers/; my $base_schema = $base_t->translate ( parser => 'YAML', @@ -170,7 +170,7 @@ sub check_roundtrip { # parse the sql back my $parser_t = SQL::Translator->new; - $parser_t->$_ (1) for qw/add_drop_table no_comments/; + $parser_t->$_ (1) for qw/add_drop_table no_comments quote_identifiers/; my $mid_schema = $parser_t->translate ( data => $base_out, parser => $args->{engine}, @@ -194,7 +194,7 @@ sub check_roundtrip { _get_table_info ($mid_schema->get_tables), _get_table_info ($base_schema->get_tables), "Schema tables generally match afer $args->{name} parser trip", - ) or return; + ) or (diag(explain _get_table_info($mid_schema->get_tables)), return); # and produce sql once again diff --git a/t/data/roundtrip.xml b/t/data/roundtrip.xml index 8630ee0..3bb84f1 100644 --- a/t/data/roundtrip.xml +++ b/t/data/roundtrip.xml @@ -88,6 +88,17 @@ Created on Fri Aug 15 15:08:18 2003 + + + + + + +