summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorSimon Bertrang <simon@cvs.openbsd.org>2007-11-11 12:57:27 +0000
committerSimon Bertrang <simon@cvs.openbsd.org>2007-11-11 12:57:27 +0000
commit967c67876324858a356573173e882a8ea5c0781b (patch)
treeb9f9f889bea4be6f71f1a07ab5da2c13688d472e /gnu/usr.bin
parentef797857e46ef8f638439d70b8d2bddd74acfad6 (diff)
import perl 5.10.0 from CPAN
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/perl/lib/File/Temp/t/cmp.t11
-rw-r--r--gnu/usr.bin/perl/lib/File/Temp/t/seekable.t32
2 files changed, 43 insertions, 0 deletions
diff --git a/gnu/usr.bin/perl/lib/File/Temp/t/cmp.t b/gnu/usr.bin/perl/lib/File/Temp/t/cmp.t
new file mode 100644
index 00000000000..a1b78cbea15
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/File/Temp/t/cmp.t
@@ -0,0 +1,11 @@
+#!perl -w
+# Test overloading
+
+use Test::More tests => 3;
+use strict;
+
+BEGIN {use_ok( "File::Temp" ); }
+
+my $fh = new File::Temp();
+ok( "$fh" ne "foo", "compare stringified object with string");
+ok( $fh ne "foo", "compare object with string");
diff --git a/gnu/usr.bin/perl/lib/File/Temp/t/seekable.t b/gnu/usr.bin/perl/lib/File/Temp/t/seekable.t
new file mode 100644
index 00000000000..8432a1d90d2
--- /dev/null
+++ b/gnu/usr.bin/perl/lib/File/Temp/t/seekable.t
@@ -0,0 +1,32 @@
+# -*- perl -*-
+# Before `make install' is performed this script should be runnable with
+# `make test'. After `make install' it should work as `perl File-Temp.t'
+
+#########################
+
+# change 'tests => 1' to 'tests => last_test_to_print';
+
+use Test::More tests => 7;
+BEGIN { use_ok('File::Temp') };
+
+#########################
+
+# Insert your test code below, the Test::More module is use()ed here so read
+# its man page ( perldoc Test::More ) for help writing this test script.
+
+# make sure we can create a tmp file...
+$tmp = File::Temp->new;
+isa_ok( $tmp, 'File::Temp' );
+isa_ok( $tmp, 'IO::Handle' );
+isa_ok( $tmp, 'IO::Seekable' );
+
+# make sure the seek method is available...
+ok( File::Temp->can('seek'), 'tmp can seek' );
+
+# make sure IO::Handle methods are still there...
+ok( File::Temp->can('print'), 'tmp can print' );
+
+# let's see what we're exporting...
+$c = scalar @File::Temp::EXPORT;
+$l = join ' ', @File::Temp::EXPORT;
+ok( $c == 9, "really exporting $c: $l" );