Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (23 sloc) 1.06 kb
use v6;
use Test;
=begin pod
Parts of this file were originally derived from the perl5 CPAN module
Perl6::Rules, version 0.3 (12 Apr 2004), file t/word.t.
=end pod
plan 11;
#?pugs emit force_todo(3,4,5);
ok(!( "abc def" ~~ m/abc def/ ), 'Literal space nonmatch' );
ok( "abcdef" ~~ m/abc def/, 'Nonspace match' );
ok( "abc def" ~~ m:s/abc def/, 'Word space match' );
#?rakudo 2 todo 'unknown'
ok( "abc\ndef" ~~ m:sigspace/abc def/, 'Word newline match' );
ok(!( "abcdef" ~~ m:sigspace/abc def/ ), 'Word nonspace nonmatch' );
ok( "abc def" ~~ m:sigspace/abc <.ws> def/, 'Word explicit space match');
ok 'abc def' ~~ m/:s abc def/, 'inline :s (+)';
ok 'zabc def' !~~ m/:s abc def/, 'inline :s implies <.ws> immediately (-)';
ok 'zabc def' ~~ m/:s'abc' def/, 'inline :s implies <.ws> immediately (+)';
# L<S05/Modifiers/The :s modifier is considered sufficiently important>
#?rakudo 2 skip 'mm'
ok 'abc def' ~~ mm/c d/, 'mm// works, implies :s (+)';
ok 'abcdef' !~~ mm/c d/, 'mm// works, implies :s (-)';
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.