X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F38-filter-names.t;h=47428b44b5d8c0f8c41713533c2e4a06ca83c458;hb=5f31ed66f75751dbf891ad5cd5e5a933d64dfd29;hp=8802c86fbb5dc2ee43d44135efbfb0eff4ccfc1a;hpb=0e4526944c49a69baaa77efa8f426e04c52d5e95;p=dbsrgits%2FSQL-Translator.git diff --git a/t/38-filter-names.t b/t/38-filter-names.t index 8802c86..47428b4 100644 --- a/t/38-filter-names.t +++ b/t/38-filter-names.t @@ -33,14 +33,11 @@ schema: procedures: {} tables: person: - comments: '' constraints: [] fields: First_name: - comments: '' data_type: foovar default_value: ~ - extra: {} is_nullable: 1 is_primary_key: 0 is_unique: 0 @@ -64,7 +61,7 @@ translator: producer_type: SQL::Translator::Producer::YAML show_warnings: 1 trace: 0 - version: 0.07 + version: SUPPRESSED }; # Parse the test schema @@ -89,4 +86,7 @@ my $out; lives_ok { $out = $obj->translate; } "Translate ran"; is $obj->error, '' ,"No errors"; ok $out ne "" ,"Produced something!"; +# Somewhat hackishly modify the yaml with a regex to avoid +# failing randomly on every change of version. +$out =~ s/version: .*/version: SUPPRESSED/; eq_or_diff $out, $ans_yaml ,"Output looks right";