Author: kjs
Date: Sun Apr 1 10:18:01 2007
New Revision: 17929
Added:
trunk/compilers/pirc/t/sub.t
Modified:
trunk/config/gen/makefiles/pirc.in
Log:
compilers/pirc:
* tests for pirc!
* add first test file
* change makefile pirc.in to allow make test and make testclean
Added: trunk/compilers/pirc/t/sub.t
==============================================================================
--- (empty file)
+++ trunk/compilers/pirc/t/sub.t Sun Apr 1 10:18:01 2007
@@ -0,0 +1,29 @@
+#!perl
+
+use strict;
+use warnings;
+use lib qw( . ../../../lib);
+use Test::More;
+use Parrot::Config;
+use Parrot::Test tests => 2;
+
+pir_output_is( <<'CODE', <<'OUTPUT', "simple sub" );
+.sub test :main
+
+.end
+CODE
+OUTPUT
+
+pir_output_is( <<'CODE', <<'OUTPUT', "simple sub with flag" );
+.sub test :main
+
+.end
+CODE
+OUTPUT
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: trunk/config/gen/makefiles/pirc.in
==============================================================================
--- trunk/config/gen/makefiles/pirc.in (original)
+++ trunk/config/gen/makefiles/pirc.in Sun Apr 1 10:18:01 2007
@@ -71,10 +71,10 @@
@echo ""
@echo " all: pirc"
@echo " This is the
default."
-# @echo "Testing:"
-# @echo " test: Run the test suite."
-# @echo " testclean: Clean up test results."
-# @echo ""
+ @echo "Testing:"
+ @echo " test: Run the test suite."
+ @echo " testclean: Clean up test results."
+ @echo ""
@echo "Cleaning:"
@echo " clean: Basic cleaning up."
@echo " realclean: Removes also files generated by
'Configure.pl'"
@@ -85,9 +85,17 @@
@echo ""
+test: all
+ cd t && prove && cd ..
+
+
+testclean:
+ $(RM_F) t\\*.pir
+
clean:
- $(RM_RF) *$(O)
+ $(RM_RF) *$(O) \
+ t\\*.pir
realclean: clean