From: Peter Rabbitson Date: Sat, 16 May 2009 06:14:58 +0000 (+0000) Subject: Add disabled YAML roundtrip test X-Git-Tag: v0.11008~163^2~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=474910eefd7ab26c9697d0b3004d52bb2c0e12bb;p=dbsrgits%2FSQL-Translator.git Add disabled YAML roundtrip test --- diff --git a/t/60roundtrip.t b/t/60roundtrip.t index f39c9c7..0db67fa 100644 --- a/t/60roundtrip.t +++ b/t/60roundtrip.t @@ -64,6 +64,11 @@ my $plan = [ # parser_args => {}, # }, +# YAML parsing/producing cycles result in some weird self referencing structure +# { +# engine => 'YAML', +# }, + # There is no Access producer # { # engine => 'Access', @@ -86,6 +91,12 @@ my $base_schema = $base_t->translate ( file => $base_file, ) or die $base_t->error; +#assume there is at least one table +my $string_re = { + XML => qr/\s* qr/\A---\n.+tables\:/s, + SQL => qr/^\s*CREATE TABLE/m, +}; for my $args (@$plan) { @@ -111,10 +122,7 @@ sub check_roundtrip { like ( $base_out, - $args->{engine} eq 'XML' #assume there is at least one table - ? qr/\s*
{$args->{engine}} || $string_re->{SQL}, "Received some meaningful output from the first $args->{name} production", ) or do { diag ( _gen_diag ($base_t->error) ); @@ -164,10 +172,7 @@ sub check_roundtrip { like ( $rt_out, - $args->{engine} eq 'XML' #assume there is at least one table - ? qr/\s*
{$args->{engine}} || $string_re->{SQL}, "Received some meaningful output from the second $args->{name} production", ) or do { diag ( _gen_diag ( $parser_t->error ) );