summaryrefslogtreecommitdiff
path: root/t/dependency.t
diff options
context:
space:
mode:
Diffstat (limited to 't/dependency.t')
-rw-r--r--t/dependency.t11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/dependency.t b/t/dependency.t
new file mode 100644
index 0000000..8c8f9d0
--- /dev/null
+++ b/t/dependency.t
@@ -0,0 +1,11 @@
+# This test checks that M:R doesn't load any other modules. Hence this
+# script cannot itself use warnings, Test::More, or any other module.
+
+BEGIN { print "1..1\n"; }
+our(%preloaded, @extraloaded);
+BEGIN { %preloaded = %INC; }
+use Module::Runtime qw(require_module);
+BEGIN { @extraloaded = sort grep { !exists($preloaded{$_}) } keys %INC; }
+print join(" ", @extraloaded) eq "Module/Runtime.pm" ? "" : "not ", "ok 1\n";
+
+1;