This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix a2p translation of '{print "a" "b" "c"}'
[perl5.git] / t / io / inplace.t
1 #!./perl
2
3 $^I = '.bak';
4
5 # $RCSfile: inplace.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:29 $
6
7 print "1..2\n";
8
9 @ARGV = ('.a','.b','.c');
10 `echo foo | tee .a .b .c`;
11 while (<>) {
12     s/foo/bar/;
13 }
14 continue {
15     print;
16 }
17
18 if (`cat .a .b .c` eq "bar\nbar\nbar\n") {print "ok 1\n";} else {print "not ok 1\n";}
19 if (`cat .a.bak .b.bak .c.bak` eq "foo\nfoo\nfoo\n") {print "ok 2\n";} else {print "not ok 2\n";}
20
21 unlink '.a', '.b', '.c', '.a.bak', '.b.bak', '.c.bak';