diff options
Diffstat (limited to 'contrib/perl5/t/op/append.t')
-rwxr-xr-x | contrib/perl5/t/op/append.t | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/perl5/t/op/append.t b/contrib/perl5/t/op/append.t new file mode 100755 index 000000000000..d11514615ac2 --- /dev/null +++ b/contrib/perl5/t/op/append.t @@ -0,0 +1,21 @@ +#!./perl + +# $RCSfile: append.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:36 $ + +print "1..3\n"; + +$a = 'ab' . 'c'; # compile time +$b = 'def'; + +$c = $a . $b; +print "#1\t:$c: eq :abcdef:\n"; +if ($c eq 'abcdef') {print "ok 1\n";} else {print "not ok 1\n";} + +$c .= 'xyz'; +print "#2\t:$c: eq :abcdefxyz:\n"; +if ($c eq 'abcdefxyz') {print "ok 2\n";} else {print "not ok 2\n";} + +$_ = $a; +$_ .= $b; +print "#3\t:$_: eq :abcdef:\n"; +if ($_ eq 'abcdef') {print "ok 3\n";} else {print "not ok 3\n";} |