@@ -3,7 +3,9 @@ use Test;
3
3
4
4
plan 7 ;
5
5
6
- is q : to"FIN", "Hello again.\n", 'basic heredoc with : to';
6
+ sub un-r ($ str ) { $ str . subst (" \r " , " " , : g) }
7
+
8
+ is un-r(q : to"FIN"), "Hello again.\n", 'basic heredoc with : to';
7
9
Hello again.
8
10
FIN
9
11
@@ -13,7 +15,7 @@ HELLO WORLD noend
13
15
14
16
throws_like { $ str . EVAL }, X::AdHoc , ' Runaway multiline is an error, no exception object yet' ;
15
17
16
- is q : to[finished], " Hello there\n everybody\n", "indention of heredocs
18
+ is un-r( q : to[finished]) , " Hello there\n everybody\n", "indention of heredocs
17
19
(1)";
18
20
Hello there
19
21
everybody
@@ -34,7 +36,7 @@ is $first, $second, "Indention stripped to end delimiter indention";
34
36
my $ dlrs = 21 ;
35
37
my $ cnts = 18 ;
36
38
37
- is q :to /EOF /. chop , ' $dlrs dollars and {$cnts} cents.' , ' no interpolation by
39
+ is un-r( q :to /EOF /) . chop , ' $dlrs dollars and {$cnts} cents.' , ' no interpolation by
38
40
default' ;
39
41
$dlrs dollars and {$cnts} cents.
40
42
EOF
@@ -44,6 +46,6 @@ is q:to:c/EOF/.chop, '$dlrs dollars and 18 cents.', ':c enables closure compilat
44
46
$ dlrs dollars and {$ cnts } cents.
45
47
EOF
46
48
47
- is qq :to /EOF /. chop , ' 21 dollars and 18 cents.' , ' heredocs with qq interpolate' ;
49
+ is un-r( qq :to /EOF /) . chop , ' 21 dollars and 18 cents.' , ' heredocs with qq interpolate' ;
48
50
$ dlrs dollars and { $ cnts } cents.
49
51
EOF
0 commit comments