diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2011-06-07 08:06:16 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2011-06-07 08:06:16 +0000 |
commit | 9d4173f2716c2f9a2d26f8f9ab0f47b351b87de7 (patch) | |
tree | 98ae3fb82096d8bb96686512ada27fa72126b09a /t/append_null.t | |
download | File-Slurp-tarball-master.tar.gz |
File-Slurp-9999.19HEADFile-Slurp-9999.19master
Diffstat (limited to 't/append_null.t')
-rw-r--r-- | t/append_null.t | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/append_null.t b/t/append_null.t new file mode 100644 index 0000000..3c8b924 --- /dev/null +++ b/t/append_null.t @@ -0,0 +1,24 @@ +#!/usr/local/bin/perl -w + +use strict ; +use File::Slurp ; + +use Test::More tests => 1 ; + +my $data = <<TEXT ; +line 1 +more text +TEXT + +my $file = 'xxx' ; + +unlink $file ; + +my $err = write_file( $file, $data ) ; +append_file( $file, '' ) ; + +my $read_data = read_file( $file ) ; + +is( $data, $read_data ) ; + +unlink $file ; |