Author: bernhard
Date: Thu Mar 22 15:22:34 2007
New Revision: 17696
Modified:
trunk/config/gen/makefiles/languages.in
trunk/languages/plumhead/TODO
trunk/languages/plumhead/lib/Parrot/Test/Plumhead.pm
trunk/languages/plumhead/t/arithmetics.t
trunk/languages/plumhead/t/harness
trunk/languages/plumhead/t/hello.t
trunk/languages/plumhead/t/superglobals.t
trunk/languages/t/harness
Log:
[Plumhead]
Mark some test cases as TODO.
Make Parrot::Test::Plumhead::Partridge the default test module.
Let "make languages" build Plumhead partrigde.
Add 'Plumhead partridge' to unified languages testing.
Update the TODO file.
Modified: trunk/config/gen/makefiles/languages.in
==============================================================================
--- trunk/config/gen/makefiles/languages.in (original)
+++ trunk/config/gen/makefiles/languages.in Thu Mar 22 15:22:34 2007
@@ -33,6 +33,7 @@
perl5 \
perl6 \
pheme \
+ plumhead \
punie \
pynie \
regex \
@@ -107,6 +108,7 @@
perl5.clean \
perl6.clean \
pheme.clean \
+ plumhead.clean \
punie.clean \
pynie.clean \
regex.clean \
@@ -316,6 +318,14 @@
pheme.clean:
- $(MAKE) pheme clean
+plumhead : plumhead.dummy
+plumhead.dummy:
+ - $(MAKE) plumhead
+plumhead.test:
+ - $(MAKE) plumhead test
+plumhead.clean:
+ - $(MAKE) plumhead clean
+
punie : punie.dummy
punie.dummy:
- $(MAKE) punie
Modified: trunk/languages/plumhead/TODO
==============================================================================
--- trunk/languages/plumhead/TODO (original)
+++ trunk/languages/plumhead/TODO Thu Mar 22 15:22:34 2007
@@ -1,25 +1,13 @@
# $Id$
-TODO:
- - add --target option for the non-partridge variants
- - segfault array_3.php with Partridge antlr3
- - unified testing
- - Implementation with PGE, make it the default implementation
- - Implementation of 'antlr3' variant, Java backend
- - Support for floating point numbers
- - Support for the superglobals _POST and _GET
- - Implement var_dump()
- - Subclass OrderedHash for PlumheadArray
- - Add another variant 'perl5regex', using Perl 5.10 (ir)regular expressions
- - distinguish between subs and keywords
-
-DONE:
- - Start a builtins library
- - String comparison ops
- - Implement php_sapi_name(), as it is used for skipping in the PHP test suite
- - bitwise op '|' and '&'
- - Set up list of tests that are expected to succeed
- - Relational operators, decode base64 encoded op names
- - if { ... } else { .. }
- - Migrate to Patrick Michauds PAST
- - Rewrite plumhead.pl in PIR
+# Just some notes, on what might be next:
+---
+- Eliminate unneeded test modules
+- Turn commented out tests into proper TODO tests, or fix the problem
+- add --target option for the non-partridge variants
+- Support for floating point numbers
+- Support for the superglobals _POST and _GET
+- Implement var_dump()
+- Subclass OrderedHash for PlumheadArray
+- Add another variant 'perl5regex', using Perl 5.10 (ir)regular expressions
+- distinguish between subs and keywords
Modified: trunk/languages/plumhead/lib/Parrot/Test/Plumhead.pm
==============================================================================
--- trunk/languages/plumhead/lib/Parrot/Test/Plumhead.pm (original)
+++ trunk/languages/plumhead/lib/Parrot/Test/Plumhead.pm Thu Mar 22
15:22:34 2007
@@ -35,7 +35,7 @@
=cut
sub new {
- my $test_module = $ENV{PARROT_PLUMHEAD_TEST_MODULE} ||
'Parrot::Test::Plumhead::Phc2Past';
+ my $test_module = $ENV{PARROT_PLUMHEAD_TEST_MODULE} ||
'Parrot::Test::Plumhead::Partridge';
return bless {}, $test_module;
}
Modified: trunk/languages/plumhead/t/arithmetics.t
==============================================================================
--- trunk/languages/plumhead/t/arithmetics.t (original)
+++ trunk/languages/plumhead/t/arithmetics.t Thu Mar 22 15:22:34 2007
@@ -113,13 +113,13 @@
[ '2 / 2 + .1', '1.1', ],
[ '2 * 2 + .4', '4.4', ],
[ '.1 - 6 / 2', '-2.9', ],
- [ '-1.0000001', '-1.0000001', 'probably limited precission of Float PMC',
],
+ # TODO [ '-1.0000001', '-1.0000001', 'probably limited precission of Float
PMC', ],
[ '1 & 3', '1', 'bitwise and', ],
[ '2 & 2 + 8', '2', 'bitwise and, less precedence than +', ],
[ '1 | 2', '3', 'bitwise or', ],
[ '6 ^ 5', '3', 'bitwise xor', ],
- [ '010', 8, 'octal' ],
- [ '0x10', 16, 'hex' ],
+ # TODO [ '010', 8, 'octal' ],
+ # TODO [ '0x10', 16, 'hex' ],
);
plan( tests => scalar(@tests) );
Modified: trunk/languages/plumhead/t/harness
==============================================================================
--- trunk/languages/plumhead/t/harness (original)
+++ trunk/languages/plumhead/t/harness Thu Mar 22 15:22:34 2007
@@ -104,7 +104,7 @@
$ENV{PARROT_PLUMHEAD_TEST_MODULE} = 'Parrot::Test::Plumhead::Perl5re';
}
else {
- $ENV{PARROT_PLUMHEAD_TEST_MODULE} = 'Parrot::Test::Plumhead::Phc2Past';
+ $ENV{PARROT_PLUMHEAD_TEST_MODULE} = 'Parrot::Test::Plumhead::Partridge';
}
Test::Harness::runtests( @files ) if scalar( @files );
Modified: trunk/languages/plumhead/t/hello.t
==============================================================================
--- trunk/languages/plumhead/t/hello.t (original)
+++ trunk/languages/plumhead/t/hello.t Thu Mar 22 15:22:34 2007
@@ -111,7 +111,10 @@
Hello, World!
END_EXPECTED
-language_output_is( 'Plumhead', <<'END_CODE', <<'END_EXPECTED', 'hello with
some HTML' );
+TODO: {
+ local $TODO = '< not handled correctly';
+
+language_output_is( 'Plumhead', <<'END_CODE', <<'END_EXPECTED', 'hello with
some HTML', todo => '< not handled correctly' );
<html>
<head>
<title>Servus</title>
@@ -137,6 +140,8 @@
</html>
END_EXPECTED
+}
+
language_output_is( 'Plumhead', <<'END_CODE', <<'END_EXPECTED', 'hello in a
scalar' );
<?php
Modified: trunk/languages/plumhead/t/superglobals.t
==============================================================================
--- trunk/languages/plumhead/t/superglobals.t (original)
+++ trunk/languages/plumhead/t/superglobals.t Thu Mar 22 15:22:34 2007
@@ -21,7 +21,10 @@
use Parrot::Test;
use Test::More tests => 3;
-language_output_is( 'Plumhead', <<'END_CODE', <<'END_EXPECTED', 'hello' );
+TODO: {
+ local $TODO = 'no support for functions returning a value';
+
+ language_output_is( 'Plumhead', <<'END_CODE', <<'END_EXPECTED',
'php_sapi_name' );
<?php
echo php_sapi_name();
echo "\n";
@@ -30,10 +33,12 @@
cgi-fcgi
END_EXPECTED
+}
+
$ENV{REQUEST_TYPE} = 'GET';
$ENV{QUERY_STRING} = 'as=df';
-language_output_is( 'Plumhead', <<'END_CODE', <<'END_EXPECTED', 'hello' );
+language_output_is( 'Plumhead', <<'END_CODE', <<'END_EXPECTED', '$_GET' );
<?php
echo $_GET['as'];
echo "\n";
@@ -42,7 +47,7 @@
df
END_EXPECTED
-language_output_is( 'Plumhead', <<'END_CODE', <<'END_EXPECTED', 'hello' );
+language_output_is( 'Plumhead', <<'END_CODE', <<'END_EXPECTED', 'var_dump(
$_GET )' );
<?php
var_dump( $_GET );
echo "\n";
Modified: trunk/languages/t/harness
==============================================================================
--- trunk/languages/t/harness (original)
+++ trunk/languages/t/harness Thu Mar 22 15:22:34 2007
@@ -106,6 +106,7 @@
parrot_compiler
pheme
PIR
+ plumhead
punie
regex
scheme