Author: bernhard Date: Thu May 5 09:57:39 2005 New Revision: 7989 Added: trunk/languages/bf/bfc.pir - copied unchanged from rev 7987, trunk/languages/bf/bfc.imc trunk/languages/bf/bfco.pir - copied unchanged from rev 7987, trunk/languages/bf/bfco.imc trunk/languages/bf/t/ trunk/languages/bf/t/harness - copied, changed from rev 7984, trunk/languages/scheme/t/harness trunk/languages/bf/t/test_bf.t trunk/languages/bf/t/test_bfc.t Removed: trunk/languages/bf/bfc.imc trunk/languages/bf/bfco.imc Modified: trunk/MANIFEST trunk/config/gen/makefiles/bf.in trunk/config/gen/makefiles/parrot_compiler.in trunk/config/gen/makefiles/scheme.in trunk/config/gen/makefiles/urm.in trunk/languages/testall Log: Added a t/harness and test scripts for 'bf'. Added 'bf' to unified languages testing. Rename bf*.imc to bf.pir
Modified: trunk/MANIFEST ============================================================================== --- trunk/MANIFEST (original) +++ trunk/MANIFEST Thu May 5 09:57:39 2005 @@ -861,8 +861,8 @@ languages/bf/README [bf] languages/bf/bench.bf [bf] languages/bf/bf.pasm [bf] -languages/bf/bfc.imc [bf] -languages/bf/bfco.imc [bf] +languages/bf/bfc.pir [bf] +languages/bf/bfco.pir [bf] languages/bf/countdown.bf [bf] languages/bf/cw.bf [bf] languages/bf/cw.txt [bf] Modified: trunk/config/gen/makefiles/bf.in ============================================================================== --- trunk/config/gen/makefiles/bf.in (original) +++ trunk/config/gen/makefiles/bf.in Thu May 5 09:57:39 2005 @@ -2,15 +2,33 @@ PERL = ${perl} PARROT=../../parrot -all: build +default: build + +help : + @echo "" + @echo "Following targets are available for the user:" + @echo "" + @echo " build: build bf.pbc and bfc.imc" + @echo " This is the default." + @echo "" + @echo " test: run the test suite," + @echo "" + @echo " clean: clean up temporary files" + @echo "" + @echo " realclean: clean up generated files" + @echo "" + @echo " help: print this help message" test: build - $(PARROT) -r bf.pbc test.bf - $(PARROT) -r bfc.pbc test.bf + cd .. && $(PERL) scheme/t/harness build: bf.pasm $(PARROT) -o bf.pbc bf.pasm - $(PARROT) -o bfc.pbc bfc.imc + $(PARROT) -o bfc.pbc bfc.pir clean: $(RM_F) core *.pbc *~ + +realclean: clean + $(RM_RF) Makefile + Modified: trunk/config/gen/makefiles/parrot_compiler.in ============================================================================== --- trunk/config/gen/makefiles/parrot_compiler.in (original) +++ trunk/config/gen/makefiles/parrot_compiler.in Thu May 5 09:57:39 2005 @@ -25,6 +25,8 @@ @echo " clean: clean up temporary files" @echo "" @echo " realclean: clean up generated files" + @echo "" + @echo " help: print this help message" test : cd .. && $(PERL) -I../lib parrot_compiler/t/harness Modified: trunk/config/gen/makefiles/scheme.in ============================================================================== --- trunk/config/gen/makefiles/scheme.in (original) +++ trunk/config/gen/makefiles/scheme.in Thu May 5 09:57:39 2005 @@ -27,6 +27,8 @@ @echo " clean: clean up temporary files" @echo "" @echo " realclean: clean up generated files" + @echo "" + @echo " help: print this help message" foo: foo.scheme schemec $(SCHEMEC) foo.scheme > foo.pasm Modified: trunk/config/gen/makefiles/urm.in ============================================================================== --- trunk/config/gen/makefiles/urm.in (original) +++ trunk/config/gen/makefiles/urm.in Thu May 5 09:57:39 2005 @@ -21,6 +21,8 @@ @echo " clean: clean up temporary files" @echo "" @echo " realclean: clean up generated files" + @echo "" + @echo " help: print this help message" test: build cd .. && $(PERL) -I../lib urm/t/harness Copied: trunk/languages/bf/t/harness (from rev 7984, trunk/languages/scheme/t/harness) ============================================================================== --- trunk/languages/scheme/t/harness (original) +++ trunk/languages/bf/t/harness Thu May 5 09:57:39 2005 @@ -2,17 +2,17 @@ =head1 NAME -languages/scheme/t/harness - A harness for scheme +languages/bf/t/harness - A harness for bf =head1 SYNOPSIS - cd languages && perl -I../lib scheme/t/harness --files + cd languages && perl -I../lib bf/t/harness --files - cd languages && perl -I../lib scheme/t/harness + cd languages && perl -I../lib bf/t/harness - cd languages && perl -I../lib scheme/t/harness \ - scheme/t/logic/basic.t \ - scheme/t/logic/defines.t + cd languages && perl -I../lib bf/t/harness \ + bf/t/test_bf.t \ + bf/t/test_bfc.t =head1 DESCRIPTION @@ -27,18 +27,17 @@ =cut use strict; -use lib '../lib', 'scheme'; use Cwd(); use File::Spec; use Test::Harness(); -my $language = 'scheme'; +my $language = 'bf'; if ( grep { m/^--files$/ } @ARGV ) { # Only the Makefile in 'parrot/languages' uses --files my $dir = File::Spec->catfile( $language, 't' ); - my @files = glob( File::Spec->catfile( $dir, '*/*.t' ) ); + my @files = glob( File::Spec->catfile( $dir, '*.t' ) ); print join( "\n", @files ); print "\n" if scalar(@files); } else { @@ -49,7 +48,7 @@ } else { ( undef, undef, my $current_dir ) = File::Spec->splitpath( Cwd::getcwd() ); if ( $current_dir eq 'languages' ) { - @files = glob( File::Spec->catfile( $language, 't', '*', '*.t' ) ); + @files = glob( File::Spec->catfile( $language, 't', '*.t' ) ); } elsif ( $current_dir eq $language ) { @files = glob( File::Spec->catfile( 't', '*', '*.t' ) ); @@ -60,6 +59,6 @@ =head1 SEE ALSO - F<languages/tcl/t/harness>, F<languages/scheme/t/harness>, F<languages/m4/t/harness>, F<languages/python/t/harness> + F<languages/scheme/t/harness> =cut Added: trunk/languages/bf/t/test_bf.t ============================================================================== --- (empty file) +++ trunk/languages/bf/t/test_bf.t Thu May 5 09:57:39 2005 @@ -0,0 +1,6 @@ +# $Id$ + +# Test bf compiler +# Print TAP, Test Anything Protocol + +system( "../parrot -r bf/bf.pbc bf/test.bf" ); Added: trunk/languages/bf/t/test_bfc.t ============================================================================== --- (empty file) +++ trunk/languages/bf/t/test_bfc.t Thu May 5 09:57:39 2005 @@ -0,0 +1,6 @@ +# $Id$ + +# Test bf interpreter +# Print TAP, Test Anything Protocol + +system( "../parrot -r bf/bfc.pbc bf/test.bf" ); Modified: trunk/languages/testall ============================================================================== --- trunk/languages/testall (original) +++ trunk/languages/testall Thu May 5 09:57:39 2005 @@ -50,7 +50,6 @@ # # BASIC No t/harness # befunge No t/harness -# bf No t/harness # cola No t/harness # conversion No t/harness # forth No t/harness @@ -60,14 +59,12 @@ # ook No t/harness # parakeet No t/harness # perl6 t/harness has no --files -# python -#my @unified_testable_languages = qw( python ); +# python needs testing # regex No t/harness # ruby No t/harness -# tcl No t/harness -#my @unified_testable_languages = qw( tcl ); +# tcl needs testing -my @unified_testable_languages = qw( m4 parrot_compiler scheme urm ); +my @unified_testable_languages = qw( bf m4 parrot_compiler scheme urm ); my @harnesses = grep {-f $_} map { File::Spec->join($_,"t","harness") }