Skip to content

Commit

Permalink
[v6.d REVIEW] Add another test for trailing ws in :s
Browse files Browse the repository at this point in the history
To cover the case where it'd fail

Orig: bb4510143
  • Loading branch information
zoffixznet committed Aug 4, 2018
1 parent 524fdd6 commit f677510
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion S05-modifier/sigspace.t
Expand Up @@ -9,7 +9,7 @@ Perl6::Rules, version 0.3 (12 Apr 2004), file t/word.t.
=end pod

plan 18;
plan 19;

ok(!( "abc def" ~~ m/abc def/ ), 'Literal space nonmatch' );
ok( "abcdef" ~~ m/abc def/, 'Nonspace match' );
Expand All @@ -24,6 +24,7 @@ ok 'zabc def' ~~ m/:s'abc' def/, "inline :s (+)";
ok 'zabc def' ~~ m/:s abc def/, "inline :s doesn't imply <.ws> immediately (-)";

ok 'zabc def ' ~~ m/:s abc def /, "inline :s (sigspace)'s trailing whitespace is significant";
nok 'zabc defmef' ~~ m/:s abc def /, "inline :s (sigspace)'s trailing whitespace is significant (2)";
is ' a' ~~ m:s/ a/, 'a', "m:s/ / starting whitespace between delimiters is not significant.";

# L<S05/Modifiers/The :s modifier is considered sufficiently important>
Expand Down

0 comments on commit f677510

Please sign in to comment.