Author: bernhard
Date: Wed Mar 14 11:41:53 2007
New Revision: 17480

Modified:
   trunk/languages/regex/config/makefiles/root.in
   trunk/languages/regex/lib/Parrot/Test/Regex.pm
   trunk/languages/regex/t/harness

Log:
[languages/regex]
Use Parrot::Test::Harness, simplifying t/harness
Use Parrot::Test::path_to_parrot(), making 'make test' in
languages/regex work again.


Modified: trunk/languages/regex/config/makefiles/root.in
==============================================================================
--- trunk/languages/regex/config/makefiles/root.in      (original)
+++ trunk/languages/regex/config/makefiles/root.in      Wed Mar 14 11:41:53 2007
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, The Perl Foundation.
+# Copyright (C) 2005-2007, The Perl Foundation.
 # $Id$
 
 # Makefile for languages/regex
@@ -21,19 +21,7 @@
 # working on to the oldest, so that I see the failures quicker.
 .PHONY: test
 test :
-       -$(PERL) test.pl t/basic/backopt.t
-       -$(PERL) test.pl t/basic/quantindex.t
-       -$(PERL) test.pl t/basic/literal.t
-       -$(PERL) test.pl t/basic/optional.t
-       -$(PERL) test.pl t/basic/group.t
-       -$(PERL) test.pl t/basic/a.t
-       -$(PERL) test.pl t/basic/star.t
-       -$(PERL) test.pl t/basic/scanstar.t
-       -$(PERL) test.pl t/basic/alt.t
-       -$(PERL) test.pl t/basic/scanalt.t
-       -$(PERL) test.pl t/basic/staralt.t
-       -$(PERL) test.pl t/basic/plus.t
-       -$(PERL) test.pl t/basic/example.t
+       $(PERL) t/harness
 
 # This is a TODO test -- currently, it loops forever. It will require
 # adding a check to the matcher that it is making progress. Or

Modified: trunk/languages/regex/lib/Parrot/Test/Regex.pm
==============================================================================
--- trunk/languages/regex/lib/Parrot/Test/Regex.pm      (original)
+++ trunk/languages/regex/lib/Parrot/Test/Regex.pm      Wed Mar 14 11:41:53 2007
@@ -11,6 +11,7 @@
 use File::Basename;
 use File::Spec::Functions;
 use Parrot::Config;
+use Parrot::Test;
 
 =head1 NAME
 
@@ -22,7 +23,7 @@
 
 =cut
 
-my $PARROT_EXE = File::Spec->catfile( File::Spec->updir(), $PConfig{test_prog} 
);
+my $PARROT_EXE = File::Spec->catfile( Parrot::Test::path_to_parrot(), 
$PConfig{test_prog} );
 
 sub run_spec {
     my ($spec_fh) = @_;

Modified: trunk/languages/regex/t/harness
==============================================================================
--- trunk/languages/regex/t/harness     (original)
+++ trunk/languages/regex/t/harness     Wed Mar 14 11:41:53 2007
@@ -1,51 +1,8 @@
-# $Id$
-
-=head1 NAME
-
-languages/regex/t/harness - A harness for Parrot bc
-
-=head1 SYNOPSIS
-
-  cd languages && perl -I../lib regex/t/harness --files
-
-=head1 DESCRIPTION
-
-If I'm called with a single
-argument of "--files", I just return a list of files to process.
-This list is one per line, and is relative to the languages dir.
-
-=cut
-
-use strict;
-use lib '..';
+#! perl
 
-use Cwd();
-use Data::Dumper;
-use File::Spec;
-use Test::Harness();
-
-my $language = 'regex';
-
-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' ) );
-    print join( "\n", @files );
-    print "\n" if scalar(@files);
-} else {
-    die "Only '--files' is supported"; 
-}
-
-=head1 HISTORY
-
-Mostly taken from bc/t/harness.
-
-=head1 SEE ALSO
-
-  F<languages/tcl/t/harness>, F<languages/scheme/t/harness>, 
F<languages/m4/t/harness>, F<languages/python/t/harness>
-
-=head1 AUTHOR
+# $Id$
 
-Bernhard Schmalhofer - <[EMAIL PROTECTED]>
+use FindBin;
+use lib qw( . lib ../lib ../../lib ../../lib );
 
-=cut
+use Parrot::Test::Harness language => 'regex';

Reply via email to