Author: jkeenan Date: Sun Dec 7 09:04:23 2008 New Revision: 33619 Modified: branches/testparrottest/lib/Parrot/Test.pm branches/testparrottest/t/perl/Parrot_Test.t
Log: Add example_error_output_* test functions. Correct one error-handling case. Modified: branches/testparrottest/lib/Parrot/Test.pm ============================================================================== --- branches/testparrottest/lib/Parrot/Test.pm (original) +++ branches/testparrottest/lib/Parrot/Test.pm Sun Dec 7 09:04:23 2008 @@ -405,6 +405,9 @@ example_output_is => 'language_output_is', example_output_like => 'language_output_like', example_output_isnt => 'language_output_isnt', + example_error_output_is => 'language_error_output_is', + example_error_output_isnt => 'language_error_output_is', + example_error_output_like => 'language_error_output_like', ); foreach my $func ( keys %example_test_map ) { @@ -435,7 +438,7 @@ ); } else { - fail( defined $extension, "no extension recognized for $example_f" ); + $builder->diag("no extension recognized for $example_f"); } }; Modified: branches/testparrottest/t/perl/Parrot_Test.t ============================================================================== --- branches/testparrottest/t/perl/Parrot_Test.t (original) +++ branches/testparrottest/t/perl/Parrot_Test.t Sun Dec 7 09:04:23 2008 @@ -30,7 +30,7 @@ plan( skip_all => "Test::Builder::Tester not installed\n" ); exit 0; } - plan( tests => 112 ); + plan( tests => 115 ); } use lib qw( . lib ../lib ../../lib ); @@ -53,6 +53,8 @@ c_output_like c_output_unlike example_output_is example_output_isnt example_output_like + example_error_output_is example_error_output_isnt + example_error_output_like language_error_output_is language_error_output_isnt language_error_output_like language_output_is language_output_isnt @@ -386,6 +388,16 @@ $expected = qr/answer.*42.*Parrot!/s; example_output_like( $file, $expected ); +$file = q{t/perl/testlib/hello}; +$expected = qq{no extension recognized for $file}; +example_error_output_is( $file, $expected ); + +$expected = qq{some extension recognized for $file}; +example_error_output_isnt( $file, $expected ); + +$expected = qr{no extension recognized for $file}; +example_error_output_like( $file, $expected ); + ##### C-output test functions ##### my $c_code = <<'ENDOFCODE';