Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
more heredoc patches
  • Loading branch information
timo committed Jul 12, 2013
1 parent 79af625 commit c02bce1
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion S02-literals/heredocs.t
@@ -1,5 +1,5 @@
use Test;
plan 10;
plan 13;

my $foo = "FOO";
my $bar = "BAR";
Expand Down Expand Up @@ -89,3 +89,30 @@ $multiline = "Hello\n World";

is no-r(@q[0]), "first line\nHello\n World something\nanother line\n", "extra spaces after interpolation will be kept";
}

{
my ($one, $two) = <foo bar>;
my @q = qq:to/END/;
{$one}{$two}
stuff
END

is no-r(@q[0]), "foobar\nstuff\n", "interpolations without constant strings in the middle";

my @q2 = qq:to/END/;
stuff
{$one}{$two}
END

is no-r(@q2[0]), "stuff\nfoobar\n", "interpolations at the very end";

my @q3 = qq:to/END/;
line one
line two
$one
END

is no-r(@q3[0]), "line one\n\nline two\n\nfoo\n", "empty lines";
}

0 comments on commit c02bce1

Please sign in to comment.