diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-08-28 00:44:15 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-08-28 00:44:15 +0100 |
commit | 2adbc9b6919cad1240a834325b355e9b2d5efd67 (patch) | |
tree | a8ca75ac9ed7b8284a533b3f24c8407110d0c546 /ext/Fcntl | |
parent | d418880282b996e8cb066a570596b473fa7900da (diff) | |
download | perl-2adbc9b6919cad1240a834325b355e9b2d5efd67.tar.gz |
Make extensions in ext run their tests from the extension's own directory.
Inspired by, and in parts borrows from, Schwern's branch on github, but takes a
slightly different approach in places.
Not quite perfect yet - ext/File-Glob still runs from t, at least one FIXME
needs fixing, and the changes to dual-life modules' tests need to be filtered
back upstream, and possibly modified to suit their respective authors.
But it works.
Diffstat (limited to 'ext/Fcntl')
-rw-r--r-- | ext/Fcntl/t/fcntl.t | 5 | ||||
-rw-r--r-- | ext/Fcntl/t/mode.t | 4 | ||||
-rw-r--r-- | ext/Fcntl/t/syslfs.t | 2 |
3 files changed, 1 insertions, 10 deletions
diff --git a/ext/Fcntl/t/fcntl.t b/ext/Fcntl/t/fcntl.t index d5d772f235..b689f781cc 100644 --- a/ext/Fcntl/t/fcntl.t +++ b/ext/Fcntl/t/fcntl.t @@ -1,10 +1,5 @@ #!./perl -BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; -} - # A modest test: exercises only O_WRONLY, O_CREAT, and O_RDONLY. # Have to be modest to be portable: could possibly extend testing # also to O_RDWR and O_APPEND, but dunno about the portability of, diff --git a/ext/Fcntl/t/mode.t b/ext/Fcntl/t/mode.t index 57135f6d38..57bd0c470c 100644 --- a/ext/Fcntl/t/mode.t +++ b/ext/Fcntl/t/mode.t @@ -1,9 +1,7 @@ #!./perl -w BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; - require './test.pl'; + require 'test.pl'; } plan tests => 2; diff --git a/ext/Fcntl/t/syslfs.t b/ext/Fcntl/t/syslfs.t index 0843b6019e..3417e443e4 100644 --- a/ext/Fcntl/t/syslfs.t +++ b/ext/Fcntl/t/syslfs.t @@ -3,8 +3,6 @@ # If you modify/add tests here, remember to update also t/op/lfs.t. BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; require Config; import Config; # Don't bother if there are no quad offsets. if ($Config{lseeksize} < 8) { |