develooper Front page | perl.perl6.compiler | Postings from December 2004

Re: PGE tests wanted (was P6GE tests wanted)

Thread Previous | Thread Next
From:
Markus Laire
Date:
December 18, 2004 02:16
Subject:
Re: PGE tests wanted (was P6GE tests wanted)
Message ID:
41C4037F.3@laire.info
Patrick R. Michaud wrote:
>>Larry mentioned 're_tests' file from perl5-source. Is anyone working on 
>>it currently? I could make a simple script to convert at least some of 
>>it to this pge-testing format which uses p6rule_*

'simple script' .. it isn't so simple anymore ;)

> I'm not aware of anyone working on it currently, so please go ahead
> and do this!

This test seems to cause an infinite loop
(with parrot_2004-12-16_160001)

p6rule_isnt('a--', '^[a?b?]*$', 're_tests 387 (#438)');  # infinite loop



I currently have some 400..500 tests autoconverted from 're_tests', but 
quite many are broken as my script still has few bugs. I'll send the 
tests here once I get as many tests converted as seems plausible. (The 
rest can then be converted manually, or ignored. Not all of those tests 
have use with perl6, e.g. many tests for \z \Z $ etc...)



Resulting file 're_tests.t' has original lines as comments, so if test 
fails, it's easy to check whether problem is in test or in pge.

(Currently I skip all tests for $+ as pge-testing format doesn't support 
this. I'm not sure if these are needed for anything, as it's trivial to 
get endpoint from startpoint and string length.)

========== re_tests.t example ==========
use Parrot::Test 'no_plan';
use Parrot::Test::PGE;
# Tests from re_tests in perl5-source

# --- re_tests ---

# 1: abc	abc	y	$&	abc
# 2: abc	abc	y	$-[0]	0
# 3: abc	abc	y	$+[0]	3 # SKIP
p6rule_like('abc', 'abc', qr/0: <\Qabc\E @ 0>/, 're_tests 1 (#1)');
# 4: abc	xbc	n	-	-
p6rule_isnt('xbc', 'abc', 're_tests 2 (#2)');
# 5: abc	axc	n	-	-
p6rule_isnt('axc', 'abc', 're_tests 3 (#3)');
# 6: abc	abx	n	-	-
p6rule_isnt('abx', 'abc', 're_tests 4 (#4)');
# 7: abc	xabcy	y	$&	abc
# 8: abc	xabcy	y	$-[0]	1
# 9: abc	xabcy	y	$+[0]	4 # SKIP
p6rule_like('xabcy', 'abc', qr/0: <\Qabc\E @ 1>/, 're_tests 5 (#5)');
...
...
========== re_tests.t example ==========

-- 
Markus Laire

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About