From: Jarkko Hietaniemi Date: Mon, 29 May 2000 17:23:55 +0000 (+0000) Subject: Changes for the File::Temp 0.08 (change #6159) test suite X-Git-Tag: accepted/trunk/20130322.191538~34817^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e2cf2bdb3ec4f6752299142b6793db46c2033302;p=platform%2Fupstream%2Fperl.git Changes for the File::Temp 0.08 (change #6159) test suite to fit better into the Perl distribution test framework. p4raw-link: @6159 on //depot/cfgperl: 1c19c86813086fb9efca2171c6506afe1bfe8cc4 p4raw-id: //depot/cfgperl@6160 --- diff --git a/t/lib/ftmp-mktemp.t b/t/lib/ftmp-mktemp.t index 2f41d5d..35ab59c 100755 --- a/t/lib/ftmp-mktemp.t +++ b/t/lib/ftmp-mktemp.t @@ -1,11 +1,16 @@ -#!/usr/local/bin/perl -w +#!/usr/bin/perl -w # Test for mktemp family of commands in File::Temp # Use STANDARD safe level for these tests +BEGIN { + chdir 't' if -d 't'; + unshift @INC, '../lib'; + require Test; import Test; + plan(tests => 9); +} + use strict; -use Test; -BEGIN { plan tests => 9 } use File::Spec; use File::Path; diff --git a/t/lib/ftmp-posix.t b/t/lib/ftmp-posix.t index 149ac9a..6802374 100755 --- a/t/lib/ftmp-posix.t +++ b/t/lib/ftmp-posix.t @@ -1,9 +1,14 @@ -#!/usr/local/bin/perl -w +#!/usr/bin/perl -w # Test for File::Temp - POSIX functions +BEGIN { + chdir 't' if -d 't'; + unshift @INC, '../lib'; + require Test; import Test; + plan(tests => 7); +} + use strict; -use Test; -BEGIN { plan tests => 7} use File::Temp qw/ :POSIX unlink0 /; ok(1); diff --git a/t/lib/ftmp-security.t b/t/lib/ftmp-security.t index a3849bd..06799b3 100755 --- a/t/lib/ftmp-security.t +++ b/t/lib/ftmp-security.t @@ -1,14 +1,18 @@ -#!/usr/local/bin/perl -w +#!/usr/bin/perl -w # Test for File::Temp - Security levels # Some of the security checking will not work on all platforms # Test a simple open in the cwd and tmpdir foreach of the # security levels -use strict; -use Test; -BEGIN { plan tests => 13} +BEGIN { + chdir 't' if -d 't'; + unshift @INC, '../lib'; + require Test; import Test; + plan(tests => 13); +} +use strict; use File::Spec; # Set up END block - this needs to happen before we load diff --git a/t/lib/ftmp-tempfile.t b/t/lib/ftmp-tempfile.t index 517151a..3cb73c2 100755 --- a/t/lib/ftmp-tempfile.t +++ b/t/lib/ftmp-tempfile.t @@ -1,9 +1,14 @@ -#!/usr/local/bin/perl -w +#!/usr/bin/perl -w # Test for File::Temp - tempfile function +BEGIN { + chdir 't' if -d 't'; + unshift @INC, '../lib'; + require Test; import Test; + plan(tests => 11); +} + use strict; -use Test; -BEGIN { plan tests => 11} use File::Spec; # Will need to check that all files were unlinked correctly