DynaLoader: extend t/DynaLoader.t to be run from basedir also
authorReini Urban <rurban@cpanel.net>
Wed, 11 Mar 2015 17:11:53 +0000 (18:11 +0100)
committerTony Cook <tony@develop-help.com>
Tue, 10 Nov 2015 21:56:28 +0000 (08:56 +1100)
This simplifies testing from core.

ext/DynaLoader/t/DynaLoader.t

index fe730b9..77fb65d 100644 (file)
@@ -2,7 +2,12 @@
 
 use strict;
 use Config;
-require '../../t/test.pl';
+push @INC, '.';
+if (-f 't/test.pl') {
+  require 't/test.pl';
+} else {
+  require '../../t/test.pl';
+}
 
 my %modules;