7 # Modified from the original inplace.t to test adding prefixes
11 my @tfiles = (tempfile(), tempfile(), tempfile());
12 my @tfiles_bak = map "bak.$_", @tfiles;
14 END { unlink_all(@tfiles_bak); }
16 for my $file (@tfiles) {
17 runperl( prog => 'print qq(foo\n);',
18 args => ['>', $file] );
30 is ( runperl( prog => 'print<>;', args => \@tfiles ),
32 "file contents properly replaced" );
34 is ( runperl( prog => 'print<>;', args => \@tfiles_bak ),
36 "backup file contents stay the same" );