Skip to content

Commit 037d934

Browse files
committed
Test nqp::replace.
1 parent da7532a commit 037d934

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

t/nqp/59-nqpop.t

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Test nqp::op pseudo-functions.
44

5-
plan(242);
5+
plan(243);
66

77
ok( nqp::add_i(5,2) == 7, 'nqp::add_i');
88
ok( nqp::sub_i(5,2) == 3, 'nqp::sub_i');
@@ -374,6 +374,8 @@ my $b2 := nqp::rand_n(4);
374374
ok($a1 == $a2, "after calling srand the first generated number is the same");
375375
ok($b1 == $b2, "after calling srand the second generated number is the same");
376376

377+
ok(nqp::replace("0123456789", 2, 4, "abc") eq "01abc6789", "nqp::replace");
378+
377379
# TODO higher unicode values
378380
ok(nqp::bitand_s('blabla12$#@', '9$dfa23219') eq ' $`b` 12 !', "nqp::bitand_s");
379381
ok(nqp::bitor_s('blabla12$#@', '9$dfa23219') eq '{lefms325;@', "nqp::bitor_s");

0 commit comments

Comments
 (0)