summaryrefslogtreecommitdiff
path: root/cpan/File-Temp/t/object.t
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/File-Temp/t/object.t')
-rw-r--r--cpan/File-Temp/t/object.t12
1 files changed, 11 insertions, 1 deletions
diff --git a/cpan/File-Temp/t/object.t b/cpan/File-Temp/t/object.t
index 267ccd2806..5732bfd0c2 100644
--- a/cpan/File-Temp/t/object.t
+++ b/cpan/File-Temp/t/object.t
@@ -2,7 +2,7 @@
# Test for File::Temp - OO interface
use strict;
-use Test::More tests => 33;
+use Test::More tests => 35;
use File::Spec;
# Will need to check that all files were unlinked correctly
@@ -57,6 +57,15 @@ ok( -d $dirname, "Directory $tdir exists");
undef $tdir;
ok( !-d $dirname, "Directory should now be gone");
+# with template
+$tdir = File::Temp->newdir( TEMPLATE => 'helloXXXXX' );
+like( "$tdir", qr/hello/, "Directory with TEMPLATE" );
+undef $tdir;
+
+$tdir = File::Temp->newdir( 'helloXXXXX' );
+like( "$tdir", qr/hello/, "Directory with leading template" );
+undef $tdir;
+
# Quick basic tempfile test
my $qfh = File::Temp->new();
my $qfname = "$qfh";
@@ -121,6 +130,7 @@ like( "$fh", qr/hello/, "saw template" );
push(@files, "$fh");
+
# Create a temporary file that should stay around after
# it has been closed
$fh = new File::Temp( TEMPLATE => 'permXXXXXXX', UNLINK => 0);