X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F27filter_generated.t;h=fc768c21e63a9d677c57af04a82735e16062742e;hb=46e71a1b3527936e885facc87a97c586d25ecc67;hp=efa38113b05763c52609cd30ce0dc7d82427ecbf;hpb=f8c2ca5eac1d4782c1d5be369c9bd0dcf680cb9d;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/t/27filter_generated.t b/t/27filter_generated.t index efa3811..fc768c2 100644 --- a/t/27filter_generated.t +++ b/t/27filter_generated.t @@ -43,12 +43,12 @@ my ($schema_file_count, $result_file_count); } $original_class_data{$class} = $text; - if ($class =~ /::1$/) { + if ($class =~ /::1$/) { $text = "No Gotcha!"; - } + } else { - $text .= q{my $foo = "Kilroy was here";}; - } + $text .= q{my $foo = "Kilroy was here";}; + } return $text; }, ); @@ -60,7 +60,7 @@ my ($schema_file_count, $result_file_count); __PACKAGE__->loader_options( dump_directory => $dump_path, quiet => 1, - filter_generated_code => "$^X t/bin/simple_filter", + filter_generated_code => qq{"$^X" t/bin/simple_filter}, ); } @@ -75,13 +75,13 @@ is $result_file_count, 4, 'correct number of result files passed to filter'; my $foo = slurp_file "$dump_path/DBICTest/Schema/1/Result/Foo.pm"; -ok(! -e "$dump_path/DBICTest/Schema/1.pm", - "No package means no file written"); -ok($original_class_data{"DBICTest::Schema::1"}, - "Even though we processed the missing class"); -like($foo, qr/# Created by .* THE FIRST PART/s, - "We get the whole autogenerated text"); -like($foo, qr/Kilroy was here/, "Can insert text"); +ok ! -e "$dump_path/DBICTest/Schema/1.pm", + "No package means no file written"; +ok $original_class_data{"DBICTest::Schema::1"}, + "Even though we processed the missing class"; +like $foo, qr/# Created by .* THE FIRST PART/s, + "We get the whole autogenerated text"; +like $foo, qr/Kilroy was here/, "Can insert text"; DBICTest::Schema::2->connect($make_dbictest_db::dsn);