summaryrefslogtreecommitdiff
path: root/t/append_null.t
diff options
context:
space:
mode:
Diffstat (limited to 't/append_null.t')
-rw-r--r--t/append_null.t24
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 ;