Permalink
Browse files

[spec] three more tests for string concatenation (with empty strings)

git-svn-id: http://svn.pugscode.org/pugs@21302 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent bd78d81 commit 2519ff9fcb9d3cc83182ba40188ada227caf339a moritz committed Jul 10, 2008
Showing with 5 additions and 1 deletion.
  1. +5 −1 S29-str/append.t
View
@@ -5,7 +5,7 @@ use Test;
# String appending with ~ operator
# L<S03/Changes to Perl 5 operators/string concatenation becomes stitching>
-plan 4;
+plan 7;
# Again, mostly stolen from Perl 5
@@ -23,3 +23,7 @@ is($c, 'abcdefxyz', '~= a literal string correctly');
my $d = $a;
$d ~= $b;
is($d, 'abcdef', '~= variable correctly');
+
+is('' ~ '', '', 'Concatenating two empty strings');
+is($d ~ '', $d, 'Concatenente non-empty and empty string');
+is('' ~ $d, $d, 'Concatenente empty and non-empty string');

0 comments on commit 2519ff9

Please sign in to comment.