summaryrefslogtreecommitdiff
path: root/lib/Switch
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Switch')
-rwxr-xr-xlib/Switch/t/given.t5
-rwxr-xr-xlib/Switch/t/nested.t7
-rwxr-xr-xlib/Switch/t/switch.t5
3 files changed, 17 insertions, 0 deletions
diff --git a/lib/Switch/t/given.t b/lib/Switch/t/given.t
index 57e72de38d..d47541a9cb 100755
--- a/lib/Switch/t/given.t
+++ b/lib/Switch/t/given.t
@@ -1,5 +1,10 @@
#! /usr/local/bin/perl -w
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
use Carp;
use Switch qw(Perl6 __ fallthrough);
diff --git a/lib/Switch/t/nested.t b/lib/Switch/t/nested.t
index 032d3a6aef..b4aceac345 100755
--- a/lib/Switch/t/nested.t
+++ b/lib/Switch/t/nested.t
@@ -1,3 +1,10 @@
+#! /usr/local/bin/perl -w
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
use Switch;
print "1..4\n";
diff --git a/lib/Switch/t/switch.t b/lib/Switch/t/switch.t
index 7b147c0d9e..5f5451d34e 100755
--- a/lib/Switch/t/switch.t
+++ b/lib/Switch/t/switch.t
@@ -1,5 +1,10 @@
#! /usr/local/bin/perl -w
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
use Carp;
use Switch qw(__ fallthrough);