#!perl # Copyright (C) 2001-2005, The Perl Foundation. # $Id: /local/t/compilers/pge/p6regex/builtins.t 13405 2006-07-20T19:40:49.105875Z pmichaud $ use strict; use warnings; use lib qw( t . lib ../lib ../../lib ../../../lib ); use Test::More; use Parrot::Test; use Parrot::Test::PGE; =head1 NAME t/p6regex/builtins.t - PGE tests of builtin rules =head1 DESCRIPTION These tests are based on L, ver. 8, in the B<<'Extensible metasyntax (<...>)'>> and B<'Nothing is illegal'> sections =head1 SYNOPSIS % prove t/p6regex/builtins.t =cut ## setup common code here for less verbose test definitions my $PRE = <?@[\\]^`_{|}0123456789ABCDEFGHIJabcdefghij"; ## -- match prior successful rule pir_output_is ($PRE.<<"CODE".$POST, <) ', todo => 'not yet implemented'); rulesub = p6rule('abc') match = rulesub($str) .local pmc second_match rulesub = p6rule('') second_match = rulesub($str) if match eq second_match goto OK CODE ok OUTPUT pir_output_is ($PRE.<<"CODE".$POST, <) ', todo => 'not yet implemented'); rulesub = p6rule('xxx') match = rulesub($str) .local pmc second_match rulesub = p6rule('') second_match = rulesub($str) if match ne second_match goto OK CODE ok OUTPUT pir_output_is ($PRE.<<"CODE".$POST, <) ', todo => 'not yet implemented'); rulesub = p6rule('abc') match = rulesub($str) .local pmc second_match rulesub = p6rule('xxx') second_match = rulesub($str) .local pmc third_match rulesub = p6rule('') third_match = rulesub($str) if match ne second_match goto OK1 print "not " OK1:print "ok 1\n" if match eq third_match goto OK2 print "not " OK2:print "ok 2\n" goto END CODE ok 1 ok 2 OUTPUT ## remember to change the number of tests :-) BEGIN { plan tests => 3; }