Skip to content

Commit e9f732d

Browse files
committed
Correct some tests for s///.
1 parent 6b28a6c commit e9f732d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

S05-substitution/subst.t

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use v6;
22

33
use Test;
44

5-
plan 141;
5+
plan 142;
66

77
# L<S05/Substitution/>
88

@@ -39,11 +39,12 @@ is '12'.subst(/(.)(.)/,{$()*2}),'24', '.. and do nifty things in closures';
3939
nok $/, '$/ is a falsey';
4040

4141
$_ = 'a';
42-
is s/a/b/, 'b', '$_ = "a"; s/a/b/ is "b"';
42+
is ~s/a/b/, 'a', '$_ = "a"; s/a/b/ stringifies to "a"';
43+
is $_, 'b', '$_ is "b"';
4344
is $/, 'a', '$/ matched "a"';
4445

4546
$_ = 'a';
46-
is s/x/y/, 'a', '$_ = "a"; s/x/y/ is "a"';
47+
is ~s/x/y/, '', '$_ = "a"; s/x/y/ stringifies to ""';
4748
nok $/, '$/ is a falsey';
4849
}
4950

0 commit comments

Comments
 (0)