Skip to content

Commit

Permalink
Match.{pre,post}match should produce Str
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Dec 10, 2016
1 parent 7530a15 commit 99a9bd8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion S05-capture/match-object.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use Test;
# this file should become the test for systematically testing
# Match objects. Exception: .caps and .chunks are tested in caps.t

plan 35;
plan 37;

ok 'ab12de' ~~ /\d+/, 'match successful';
is $/.WHAT, Match.WHAT, 'got right type';
Expand All @@ -30,6 +30,8 @@ ok 'abc def' ~~ />>/, 'sanity 1';
is $/.from, 3, 'sanity 2';
is $/.prematch, 'abc', '.prematch for zero-width matches';
is $/.postmatch, ' def', '.postmatch for zero-width matches';
isa-ok $/.prematch, Str, '.prematch produces a Str';
isa-ok $/.postmatch, Str, '.postmatch produces a Str';

nok 'abde' ~~ /\d/, 'no match';
nok $/.Bool, 'failed match is False';
Expand Down

0 comments on commit 99a9bd8

Please sign in to comment.