Author: jkeenan
Date: Sun Dec  7 08:15:21 2008
New Revision: 33616

Modified:
   branches/testparrottest/t/perl/Parrot_Test.t

Log:
Add tests for example_output* test functions.

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 08:15:21 2008
@@ -30,7 +30,7 @@
         plan( skip_all => "Test::Builder::Tester not installed\n" );
         exit 0;
     }
-    plan( tests => 106 );
+    plan( tests => 112 );
 }
 
 use lib qw( . lib ../lib ../../lib );
@@ -358,6 +358,34 @@
 /noop\s+bend/s
 OUT
 
+my $file = q{t/perl/testlib/hello.pasm};
+my $expected = qq{Hello World\n};
+example_output_is( $file, $expected );
+
+$expected = qq{Goodbye World\n};
+example_output_isnt( $file, $expected );
+
+$expected = qr{Hello World};
+example_output_like( $file, $expected );
+
+$file = q{t/perl/testlib/answer.pir};
+$expected = <<EXPECTED;
+The answer is
+42
+says Parrot!
+EXPECTED
+example_output_is( $file, $expected );
+
+$expected = <<EXPECTED;
+The answer is
+769
+says Parrot!
+EXPECTED
+example_output_isnt( $file, $expected );
+
+$expected = qr/answer.*42.*Parrot!/s;
+example_output_like( $file, $expected );
+
 ##### C-output test functions #####
 
 my $c_code = <<'ENDOFCODE';

Reply via email to