Re: [PATCH] More t/p6rules tests

0 views
Skip to first unread message

Dino Morelli

unread,
May 18, 2005, 4:35:09 PM5/18/05
to Perl 6 Internals list
On Wed, 18 May 2005, Dino Morelli wrote:

>Patch file for MANIFEST and cclass.t, and new file escape.t attached.
>

Looks like I missed the escape.t attachment.


-Dino

--
.~. Dino Morelli
/V\ email: dmor...@reactorweb.net
/( )\ weblog: http://categorically.net/d/blog/
^^-^^ preferred distro: Debian GNU/Linux http://www.debian.org

Dino Morelli

unread,
May 18, 2005, 4:52:23 PM5/18/05
to Perl 6 Internals list
On Wed, 18 May 2005, Dino Morelli wrote:

>On Wed, 18 May 2005, Dino Morelli wrote:
>
>>Patch file for MANIFEST and cclass.t, and new file escape.t attached.
>>
>
>Looks like I missed the escape.t attachment.
>

The list server keeps eating my attached homework. Won't let me attach a
.t file.

Trying to stick it in the body of the message this time...


NEW file: t/p6rules/escape.t
-------------------------------------------------------------------------
use strict;
use warnings;
use Parrot::Test tests => 16;
use Parrot::Test::PGE;


p6rule_isnt('abcdef', 'a\s+f', 'whitespace');
p6rule_is ("ab cdef", 'ab\s+cdef', 'whitespace');
p6rule_is ('abcdef', 'a\S+f', 'not whitespace');
p6rule_isnt("ab cdef", 'a\S+f', 'not whitespace');

p6rule_isnt('a=[ *f', 'a\w+f', 'word character');
p6rule_is ("abcdef", 'a\w+f', 'word character');
p6rule_is ('a&%- f', 'a\W+f', 'not word character');
p6rule_isnt("abcdef", 'a\W+f', 'not word character');

p6rule_isnt('abcdef', 'a\d+f', 'digit');
p6rule_is ("ab42cdef", 'ab\d+cdef', 'digit');
p6rule_is ('abcdef', 'a\D+f', 'not digit');
p6rule_isnt("ab0cdef", 'a\D+f', 'not digit');

p6rule_isnt('abcdef', 'a\n+f', 'logical newline');
p6rule_is ("ab\n\ncdef", 'ab\n+cdef', 'logical newline');
p6rule_is ('abcdef', 'a\N+f', 'not logical newline');
p6rule_isnt("ab\ncdef", 'a\N+f', 'not logical newline');

# dont forget to change the number of tests :-)
-------------------------------------------------------------------------

Robert Spier

unread,
May 19, 2005, 2:09:23 AM5/19/05
to Dino Morelli, Perl 6 Internals list
> The list server keeps eating my attached homework. Won't let me attach a
> .t file.

This is because your mailer is declaring it to be an
application/x-troff file.

Patrick R. Michaud

unread,
May 19, 2005, 2:40:49 PM5/19/05
to Dino Morelli, Perl 6 Internals list
On Wed, May 18, 2005 at 03:50:07PM -0400, Dino Morelli wrote:
> I moved the \N test out of t/p6rules/cclass.t and made a new file for
> escape tests: escape.t, currently containing tests for \s \S \w \W \d \D
> \n \N

>
> Patch file for MANIFEST and cclass.t, and new file escape.t attached.

I've been out of town the past couple of days -- sorry for the delay.

This and previously submitted patches applied, many thanks!

Pm

Reply all
Reply to author
Forward
0 new messages