Author: bernhard
Date: Sat Mar 3 02:59:02 2007
New Revision: 17306
Modified:
trunk/languages/PIR/t/harness
trunk/languages/t/harness
trunk/lib/Parrot/Test.pm
trunk/lib/Parrot/Test/Harness.pm
trunk/t/harness
Log:
#41674: [TODO] Add languages/PIR to unified languages testing
add PIR to unified languages testing
Remove support for '*.imc' extension in examples testing.
Modified: trunk/languages/PIR/t/harness
==============================================================================
--- trunk/languages/PIR/t/harness (original)
+++ trunk/languages/PIR/t/harness Sat Mar 3 02:59:02 2007
@@ -1,3 +1,8 @@
#! perl
-use Parrot::Test::Harness language => 'PIR_PGE';
+# $Id$
+
+# language is the directory where the language implementation lives
+# See perldoc Parrot::Test::Harness for details
+
+use Parrot::Test::Harness language => 'PIR';
Modified: trunk/languages/t/harness
==============================================================================
--- trunk/languages/t/harness (original)
+++ trunk/languages/t/harness Sat Mar 3 02:59:02 2007
@@ -1,6 +1,6 @@
#! perl
-# Copyright (C) 2004-2006, The Perl Foundation.
+# Copyright (C) 2004-2007, The Perl Foundation.
# $Id$
use strict;
@@ -86,7 +86,6 @@
# perl6 test scripts are written in Perl 6, not Perl 5
# pheme test scripts are written in Scheme, not Perl 5
# pynie test scripts are written in PIR, not Perl 5
-# PIR adaptions in language_output_is() required
# python not maintained
# ruby not maintained, should be removed
@@ -96,8 +95,8 @@
= defined $languages_list ?
split( /\s*,\s*/, $languages_list )
:
- qw( APL
- abc
+ qw( abc
+ APL
befunge
bf
cardinal
@@ -110,6 +109,7 @@
ook
parrot_compiler
pheme
+ PIR
punie
regex
scheme
Modified: trunk/lib/Parrot/Test.pm
==============================================================================
--- trunk/lib/Parrot/Test.pm (original)
+++ trunk/lib/Parrot/Test.pm Sat Mar 3 02:59:02 2007
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2006, The Perl Foundation.
+# Copyright (C) 2004-2007, The Perl Foundation.
# $Id$
=head1 NAME
@@ -46,17 +46,17 @@
=item C<language_output_is( $language, $code, $expected, $description)>
-Runs a langugage test and passes the test if a string comparison
+Runs a language test and passes the test if a string comparison
of the output with the expected result it true.
=item C<language_output_like( $language, $code, $expected, $description)>
-Runs a langugage test and passes the test
+Runs a language test and passes the test
if the output matches the expected result.
=item C<language_output_isnt( $language, $code, $expected, $description)>
-Runs a langugage test and passes the test if a string comparison
+Runs a language test and passes the test if a string comparison
if a string comparison of the output with the unexpected result is false.
=item C<pasm_output_is($code, $expected, $description)> or C<output_is($code,
$expected, $description)>
@@ -598,9 +598,8 @@
}
my %builtin_language_prefix = (
- IMC => 'pir',
- PASM => 'pasm',
- PIR => 'pir',
+ PIR_IMCC => 'pir',
+ PASM_IMCC => 'pasm',
);
my %language_test_map = (
@@ -618,6 +617,7 @@
my $meth = $language_test_map{$func};
if ( my $prefix = $builtin_language_prefix{$language} ) {
+ # builtin languages are no tested with the example_output_xx()
functions
my $level = $builder->level();
$builder->level( $level + 2 );
my $test_func = "${package}::${prefix}_${meth}";
@@ -650,7 +650,7 @@
# restore prior level, just in case.
$builder->level($level);
}
- }
+ }
}
# XXX this is broken WRT todo tests
@@ -668,13 +668,12 @@
my ( $example_f, $expected, @options ) = @_;
my %lang_for_extension = (
- pasm => 'PASM',
- pir => 'PIR',
- imc => 'PIR',
+ pasm => 'PASM_IMCC',
+ pir => 'PIR_IMCC',
);
my ($extension) = $example_f =~ m{ [.] #
introducing extension
- ( pasm | pir | imc ) # match
and capture the extension
+ ( pasm | pir ) # match
and capture the extension
\z # at end
of string
}ixms or Usage();
if ( defined $extension ) {
@@ -688,7 +687,7 @@
else {
fail( defined $extension, "no extension recognized for
$example_f" );
}
- }
+ }
}
my %c_test_map = (
Modified: trunk/lib/Parrot/Test/Harness.pm
==============================================================================
--- trunk/lib/Parrot/Test/Harness.pm (original)
+++ trunk/lib/Parrot/Test/Harness.pm Sat Mar 3 02:59:02 2007
@@ -1,4 +1,4 @@
-# Copyright (C) 2006, The Perl Foundation.
+# Copyright (C) 2006-2007, The Perl Foundation.
# $Id$
=head1 NAME
Modified: trunk/t/harness
==============================================================================
--- trunk/t/harness (original)
+++ trunk/t/harness Sat Mar 3 02:59:02 2007
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2001-2006, The Perl Foundation.
+# Copyright (C) 2001-2007, The Perl Foundation.
# $Id$
=head1 NAME