Permalink
Browse files

s|substr|$/-rw| where needed in test.pl

  • Loading branch information...
1 parent 5192417 commit fb775fb52361df71b0e14ed7705385f3184ffa54 @sorear committed May 21, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 test.pl
View
10 test.pl
@@ -1965,18 +1965,18 @@
{
my ($str, $v1, $v2);
$str = "abcdef";
- substr($str,1,2) = "xy";
+ substr-rw($str,1,2) = "xy";
is $str, "axydef", "lvalue substr is functional";
$str = "abcdef";
- substr($str,1,2) = "jklmno";
+ substr-rw($str,1,2) = "jklmno";
is $str, "ajklmnodef", "lvalue substr can change string length";
$str = "abcdef";
- $v1 := substr($str,1,2);
+ $v1 := substr-rw($str,1,2);
$str = "xyzw";
is $v1, "yz", "substr return values read lazily";
$str = "abcdef";
- $v1 := substr($str,0,1);
- $v2 := substr($str,3,1);
+ $v1 := substr-rw($str,0,1);
+ $v2 := substr-rw($str,3,1);
$v1 = "xx";
$v2 = "yy";
is $str, "xxbyydef", "substr thunks track by index";

0 comments on commit fb775fb

Please sign in to comment.