[svn:parrot] r48472 - branches/gc_threshold_tuning/t/perl

chromatic at svn.parrot.org chromatic at svn.parrot.org
Sat Aug 14 00:32:32 UTC 2010


Author: chromatic
Date: Sat Aug 14 00:32:32 2010
New Revision: 48472
URL: https://trac.parrot.org/parrot/changeset/48472

Log:
incorporate changes necessary for test to pass with Test::Builder post version 0.94

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

Modified: branches/gc_threshold_tuning/t/perl/Parrot_Test.t
==============================================================================
--- branches/gc_threshold_tuning/t/perl/Parrot_Test.t	Sat Aug 14 00:32:29 2010	(r48471)
+++ branches/gc_threshold_tuning/t/perl/Parrot_Test.t	Sat Aug 14 00:32:32 2010	(r48472)
@@ -285,6 +285,10 @@
 OUTPUT
 test_test($desc);
 
+#
+# incorporate changes in Test::Builder after Version 0.94
+#
+if ($Test::Builder::VERSION <= eval '0.94') {
 $desc = 'pir_error_output_like: todo';
 $line = line_num(+22);
 my $location;
@@ -321,6 +325,34 @@
 else {
     test_test($desc);
 }
+}  #end of test for Test::Builder 0.94 or before
+#
+# Test for TEST::Builder after Version 0.94
+#
+else {
+$line = line_num(+14);
+my $location = "at $0 line $line";
+$desc = 'pir_output_like: todo';
+test_out("not ok 1 - $desc # TODO foo");
+$err = <<"EOUT";
+#   Failed (TODO) test '$desc'
+#   $location.
+#                   'foo
+# '
+#     doesn't match '/bar/
+# '
+EOUT
+chomp $err;
+test_out($err);
+pir_output_like( <<'CODE', <<"OUTPUT", $desc, todo => 'foo' );
+.sub 'test' :main
+    print "foo\n"
+.end
+CODE
+/bar/
+OUTPUT
+    test_test($desc);
+}
 
 ##### PIR-to-PASM output test functions #####
 


More information about the parrot-commits mailing list