X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F60roundtrip.t;h=9079406c6b2d65a2edfce6a4a30a3f7a984624d7;hb=4d6f8a80c017422501b30941777ec14f91a7e10c;hp=35bda2681bb536c024adfe671be854ca4bd04772;hpb=bdf60588bb1e35e284bdc02c43d0ffe691994465;p=dbsrgits%2FSQL-Translator.git diff --git a/t/60roundtrip.t b/t/60roundtrip.t index 35bda26..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 @@ -226,9 +226,9 @@ sub check_roundtrip { # the two sql strings should be identical my $msg = "$args->{name} SQL roundtrip successful - SQL statements match"; - $ENV{SQLTTEST_RT_DEBUG} #stringify below because IO::Scalar does not behave nice - ? eq_or_diff ("$rt_out", "$base_out", $msg) - : ok ("$rt_out" eq "$base_out", $msg) + $ENV{SQLTTEST_RT_DEBUG} + ? eq_or_diff ($rt_out, $base_out, $msg) + : ok ($rt_out eq $base_out, $msg) ; }