Commit | Line | Data |
---|---|---|
635c7876 | 1 | #!/usr/local/bin/perl -w |
2 | ||
3 | use strict ; | |
99709852 | 4 | use File::Slurp ; |
635c7876 | 5 | |
99709852 | 6 | use Test::More tests => 1 ; |
635c7876 | 7 | |
8 | my $data = <<TEXT ; | |
9 | line 1 | |
10 | more text | |
11 | TEXT | |
12 | ||
13 | my $file = 'xxx' ; | |
14 | ||
15 | unlink $file ; | |
16 | ||
17 | my $err = write_file( $file, $data ) ; | |
18 | append_file( $file, '' ) ; | |
19 | ||
20 | my $read_data = read_file( $file ) ; | |
21 | ||
22 | is( $data, $read_data ) ; | |
23 | ||
635c7876 | 24 | unlink $file ; |