Author: jkeenan
Date: Sun Dec  7 07:37:45 2008
New Revision: 33609

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

Log:
Add tests for pir_2_pasm.

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 07:37:45 2008
@@ -30,7 +30,7 @@
         plan( skip_all => "Test::Builder::Tester not installed\n" );
         exit 0;
     }
-    plan( tests => 102 );
+    plan( tests => 106 );
 }
 
 use lib qw( . lib ../lib ../../lib );
@@ -319,6 +319,45 @@
     test_test($desc);
 }
 
+##### PIR-to-PASM output test functions #####
+
+my $pir_2_pasm_code = <<'ENDOFCODE';
+.sub _test
+   noop
+   end
+.end
+ENDOFCODE
+
+pir_2_pasm_is( <<CODE, <<'OUT', "pir_2_pasm:  added return - end" );
+$pir_2_pasm_code
+CODE
+# IMCC does produce b0rken PASM files
+# see http://[EMAIL PROTECTED]/rt3/Ticket/Display.html?id=32392
+_test:
+  noop
+  end
+OUT
+
+pir_2_pasm_isnt( <<CODE, <<'OUT', "pir_2_pasm:  added return - end" );
+$pir_2_pasm_code
+CODE
+_test:
+  noop
+  bend
+OUT
+
+pir_2_pasm_like( <<CODE, <<'OUT', "pir_2_pasm:  added return - end" );
+$pir_2_pasm_code
+CODE
+/noop\s+end/s
+OUT
+
+pir_2_pasm_unlike( <<CODE, <<'OUT', "pir_2_pasm:  added return - end" );
+$pir_2_pasm_code
+CODE
+/noop\s+bend/s
+OUT
+
 ##### C-output test functions #####
 
 my $c_code = <<'ENDOFCODE';

Reply via email to