aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbigail <abigail@abigail.be>2021-04-09 16:38:16 +0200
committerAbigail <abigail@abigail.be>2021-04-09 16:38:16 +0200
commitfafed8e98f280132fc442d11508e810700ab4a08 (patch)
treeb4a5ae2209d853dc43a57237c8a89b049f64a115
parent6a593c51919ce50284673882f2b301bfde57d020 (diff)
downloadperlweeklychallenge-club-fafed8e98f280132fc442d11508e810700ab4a08.tar.gz
perlweeklychallenge-club-fafed8e98f280132fc442d11508e810700ab4a08.tar.bz2
perlweeklychallenge-club-fafed8e98f280132fc442d11508e810700ab4a08.zip
More tests for week 107, part 2
-rw-r--r--challenge-107/abigail/t/Multi.pm13
-rw-r--r--challenge-107/abigail/t/Test.pm13
-rw-r--r--challenge-107/abigail/t/ctest.ini12
-rw-r--r--challenge-107/abigail/t/input-2-20
-rw-r--r--challenge-107/abigail/t/input-2-30
-rw-r--r--challenge-107/abigail/t/output-2-2.exp2
-rw-r--r--challenge-107/abigail/t/output-2-3.exp2
7 files changed, 42 insertions, 0 deletions
diff --git a/challenge-107/abigail/t/Multi.pm b/challenge-107/abigail/t/Multi.pm
new file mode 100644
index 0000000000..68c54ca995
--- /dev/null
+++ b/challenge-107/abigail/t/Multi.pm
@@ -0,0 +1,13 @@
+package Multi;
+
+use strict;
+use warnings;
+use 5.010;
+
+our $Multi = 2;
+our @Multi = (3, 4, 5);
+our %Multi = (6 => 7, 8 => 9);
+open Multi, "<", "does not exist";
+sub Multi { }
+
+1;
diff --git a/challenge-107/abigail/t/Test.pm b/challenge-107/abigail/t/Test.pm
new file mode 100644
index 0000000000..39615fcd82
--- /dev/null
+++ b/challenge-107/abigail/t/Test.pm
@@ -0,0 +1,13 @@
+package Test;
+
+use strict;
+use warnings;
+use 5.010;
+
+our $scalar = 1;
+our @array = (1, 2, 3);
+our %hash = (1 => 2);
+open FH, "<", "does not exist";
+sub sub_routine { }
+
+1;
diff --git a/challenge-107/abigail/t/ctest.ini b/challenge-107/abigail/t/ctest.ini
index 3a493dec84..3e5daaf228 100644
--- a/challenge-107/abigail/t/ctest.ini
+++ b/challenge-107/abigail/t/ctest.ini
@@ -1,6 +1,8 @@
[names]
1-1 = Fixed output
2-1 = Given example
+2-2 = Ignore non sub-routines in the slots
+2-3 = Deal with slots with multiple entries
[1-1]
no_input = 1
@@ -12,3 +14,13 @@ no_input = 0
exe_args = -It
args = %RUN_FILE Calc
sort = 1
+
+[2-2/perl]
+exe_args = -It
+args = %RUN_FILE Test
+sort = 1
+
+[2-3/perl]
+exe_args = -It
+args = %RUN_FILE Multi
+sort = 1
diff --git a/challenge-107/abigail/t/input-2-2 b/challenge-107/abigail/t/input-2-2
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/challenge-107/abigail/t/input-2-2
diff --git a/challenge-107/abigail/t/input-2-3 b/challenge-107/abigail/t/input-2-3
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/challenge-107/abigail/t/input-2-3
diff --git a/challenge-107/abigail/t/output-2-2.exp b/challenge-107/abigail/t/output-2-2.exp
new file mode 100644
index 0000000000..1a1dff1275
--- /dev/null
+++ b/challenge-107/abigail/t/output-2-2.exp
@@ -0,0 +1,2 @@
+BEGIN
+sub_routine
diff --git a/challenge-107/abigail/t/output-2-3.exp b/challenge-107/abigail/t/output-2-3.exp
new file mode 100644
index 0000000000..7158e56e04
--- /dev/null
+++ b/challenge-107/abigail/t/output-2-3.exp
@@ -0,0 +1,2 @@
+BEGIN
+Multi