]> iEval git - acme-evil.git/commitdiff
Add lots of tests
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 1 Apr 2017 16:38:37 +0000 (19:38 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 1 Apr 2017 17:03:54 +0000 (20:03 +0300)
24 files changed:
MANIFEST
t/confused.t [new file with mode: 0644]
t/disable-die.t
t/intermediate-direct.t [new file with mode: 0644]
t/intermediate-indirect.t [new file with mode: 0644]
t/intermediate-unrelated.t [new file with mode: 0644]
t/lax-direct.t [new file with mode: 0644]
t/lax-indirect.t [new file with mode: 0644]
t/lax-unrelated.t [new file with mode: 0644]
t/strict-die.t
t/t3/Evil.pm [new file with mode: 0644]
t/t3/IntermediateDirect.pm [new file with mode: 0644]
t/t3/IntermediateIndirect.pm [new file with mode: 0644]
t/t3/LaxDirect.pm [new file with mode: 0644]
t/t3/LaxIndirect.pm [new file with mode: 0644]
t/t3/UnrelatedIntermediate.pm [new file with mode: 0644]
t/t3/UnrelatedLax.pm [new file with mode: 0644]
t/t3/UsesEvil.pm [new file with mode: 0644]
t/t4/ConfusedIntermediate1.pm [new file with mode: 0644]
t/t4/ConfusedIntermediate2.pm [new file with mode: 0644]
t/t4/ConfusedLax1.pm [new file with mode: 0644]
t/t4/ConfusedLax2.pm [new file with mode: 0644]
t/t4/ConfusedStrict1.pm [new file with mode: 0644]
t/t4/ConfusedStrict2.pm [new file with mode: 0644]

index 56b0733299c84b7a4cb47d586bc16bd91c53b6cd..eb073515817ed6cc1c98eba5141c034781368d0f 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -3,8 +3,15 @@ lib/evil.pm
 Makefile.PL
 MANIFEST
 README
+t/confused.t
 t/disable-die.t
 t/disable-safe.t
+t/intermediate-direct.t
+t/intermediate-indirect.t
+t/intermediate-unrelated.t
+t/lax-direct.t
+t/lax-indirect.t
+t/lax-unrelated.t
 t/strict-die.t
 t/strict-safe.t
 t/t1/Direct.pm
@@ -14,3 +21,17 @@ t/t1/Unrelated.pm
 t/t2/Dies.pm
 t/t2/Evil.pm
 t/t2/Survives.pm
+t/t3/Evil.pm
+t/t3/IntermediateDirect.pm
+t/t3/IntermediateIndirect.pm
+t/t3/LaxDirect.pm
+t/t3/LaxIndirect.pm
+t/t3/UnrelatedIntermediate.pm
+t/t3/UnrelatedLax.pm
+t/t3/UsesEvil.pm
+t/t4/ConfusedIntermediate1.pm
+t/t4/ConfusedIntermediate2.pm
+t/t4/ConfusedLax1.pm
+t/t4/ConfusedLax2.pm
+t/t4/ConfusedStrict1.pm
+t/t4/ConfusedStrict2.pm
diff --git a/t/confused.t b/t/confused.t
new file mode 100644 (file)
index 0000000..8371dd8
--- /dev/null
@@ -0,0 +1,11 @@
+#!/usr/bin/perl
+use Test::More tests => 6;
+
+ok !eval {require t::t4::ConfusedStrict1 }, 'Confused strict 1 dies';
+%evil::wants_strict = ();
+ok !eval {require t::t4::ConfusedIntermediate1 }, 'Confused intermediate 1 dies';
+ok !eval {require t::t4::ConfusedLax1 }, 'Confused lax 1 dies';
+ok !eval {require t::t4::ConfusedStrict2 }, 'Confused strict 2 dies';
+%evil::wants_strict = ();
+ok !eval {require t::t4::ConfusedIntermediate2 }, 'Confused intermediate 2 dies';
+ok !eval {require t::t4::ConfusedLax2 }, 'Confused lax 2 dies';
index 0dec9bd9635cf603a6a64cbf7ebd4adc6cf35249..9b81c92d5cc50a4ab97ffc71c4594ead799f765e 100644 (file)
@@ -2,4 +2,3 @@
 use Test::More tests => 1;
 
 ok !eval { require t::t2::Dies }, 'Unrelated dies';
-
diff --git a/t/intermediate-direct.t b/t/intermediate-direct.t
new file mode 100644 (file)
index 0000000..6b48cce
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/perl
+use Test::More tests => 1;
+
+ok !eval {require t::t3::IntermediateDirect }, 'Direct intermediate dies';
diff --git a/t/intermediate-indirect.t b/t/intermediate-indirect.t
new file mode 100644 (file)
index 0000000..51ecb7a
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/perl
+use Test::More tests => 1;
+
+ok !eval {require t::t3::IntermediateIndirect }, 'Indirect intermediate dies';
diff --git a/t/intermediate-unrelated.t b/t/intermediate-unrelated.t
new file mode 100644 (file)
index 0000000..c731050
--- /dev/null
@@ -0,0 +1,5 @@
+#!/usr/bin/perl
+use Test::More tests => 2;
+
+require_ok 't::t3::Evil';
+require_ok 't::t3::UnrelatedIntermediate';
diff --git a/t/lax-direct.t b/t/lax-direct.t
new file mode 100644 (file)
index 0000000..89db622
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/perl
+use Test::More tests => 1;
+
+ok !eval {require t::t3::LaxDirect }, 'Direct lax dies';
diff --git a/t/lax-indirect.t b/t/lax-indirect.t
new file mode 100644 (file)
index 0000000..ed63156
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/perl
+use Test::More tests => 1;
+
+require_ok 't::t3::LaxIndirect';
diff --git a/t/lax-unrelated.t b/t/lax-unrelated.t
new file mode 100644 (file)
index 0000000..3f0d705
--- /dev/null
@@ -0,0 +1,5 @@
+#!/usr/bin/perl
+use Test::More tests => 2;
+
+require_ok 't::t3::Evil';
+require_ok 't::t3::UnrelatedLax';
index 4d7aa28e9f5705aecdcc344406a7664296304321..a43b6990e50692178d58b51ff5df515466c58d7f 100644 (file)
@@ -5,4 +5,3 @@ require_ok 't::t1::Evil';
 require_ok 't::t1::Direct';
 require_ok 't::t1::Indirect';
 ok !eval { require t::t1::Unrelated }, 'Unrelated dies';
-
diff --git a/t/t3/Evil.pm b/t/t3/Evil.pm
new file mode 100644 (file)
index 0000000..fa7b2e3
--- /dev/null
@@ -0,0 +1,3 @@
+package t::t3::Evil;
+use evil;
+1;
diff --git a/t/t3/IntermediateDirect.pm b/t/t3/IntermediateDirect.pm
new file mode 100644 (file)
index 0000000..cd83d13
--- /dev/null
@@ -0,0 +1,4 @@
+package t::t3::IntermediateDirect;
+no evil;
+use t::t3::Evil;
+1;
diff --git a/t/t3/IntermediateIndirect.pm b/t/t3/IntermediateIndirect.pm
new file mode 100644 (file)
index 0000000..7936428
--- /dev/null
@@ -0,0 +1,4 @@
+package t::t3::IntermediateIndirect;
+no evil;
+use t::t3::UsesEvil;
+1;
diff --git a/t/t3/LaxDirect.pm b/t/t3/LaxDirect.pm
new file mode 100644 (file)
index 0000000..31b6bc1
--- /dev/null
@@ -0,0 +1,4 @@
+package t::t3::LaxDirect;
+no evil ':lax';
+use t::t3::Evil;
+1;
diff --git a/t/t3/LaxIndirect.pm b/t/t3/LaxIndirect.pm
new file mode 100644 (file)
index 0000000..ec11e10
--- /dev/null
@@ -0,0 +1,4 @@
+package t::t3::LaxIndirect;
+no evil ':lax';
+use t::t3::UsesEvil;
+1;
diff --git a/t/t3/UnrelatedIntermediate.pm b/t/t3/UnrelatedIntermediate.pm
new file mode 100644 (file)
index 0000000..909187c
--- /dev/null
@@ -0,0 +1,3 @@
+package t::t3::UnrelatedIntermediate;
+no evil;
+1;
diff --git a/t/t3/UnrelatedLax.pm b/t/t3/UnrelatedLax.pm
new file mode 100644 (file)
index 0000000..c20d655
--- /dev/null
@@ -0,0 +1,3 @@
+package t::t3::UnrelatedLax;
+no evil ':lax';
+1;
diff --git a/t/t3/UsesEvil.pm b/t/t3/UsesEvil.pm
new file mode 100644 (file)
index 0000000..f10310a
--- /dev/null
@@ -0,0 +1,3 @@
+package t::t3::UsesEvil;
+use t::t3::Evil;
+1;
diff --git a/t/t4/ConfusedIntermediate1.pm b/t/t4/ConfusedIntermediate1.pm
new file mode 100644 (file)
index 0000000..702c65a
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/perl
+no evil;
+use evil;
+1;
diff --git a/t/t4/ConfusedIntermediate2.pm b/t/t4/ConfusedIntermediate2.pm
new file mode 100644 (file)
index 0000000..158f9f9
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/perl
+use evil;
+no evil;
+1;
diff --git a/t/t4/ConfusedLax1.pm b/t/t4/ConfusedLax1.pm
new file mode 100644 (file)
index 0000000..9827533
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/perl
+no evil ':lax';
+use evil;
+1;
diff --git a/t/t4/ConfusedLax2.pm b/t/t4/ConfusedLax2.pm
new file mode 100644 (file)
index 0000000..3801dd9
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/perl
+use evil;
+no evil ':lax';
+1;
diff --git a/t/t4/ConfusedStrict1.pm b/t/t4/ConfusedStrict1.pm
new file mode 100644 (file)
index 0000000..6391085
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/perl
+no evil ':strict';
+use evil;
+1;
diff --git a/t/t4/ConfusedStrict2.pm b/t/t4/ConfusedStrict2.pm
new file mode 100644 (file)
index 0000000..85519ab
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/perl
+use evil;
+no evil ':strict';
+1;
This page took 0.041463 seconds and 4 git commands to generate.