summaryrefslogtreecommitdiff
path: root/t/basic-enigma.t
diff options
context:
space:
mode:
Diffstat (limited to 't/basic-enigma.t')
-rw-r--r--t/basic-enigma.t28
1 files changed, 28 insertions, 0 deletions
diff --git a/t/basic-enigma.t b/t/basic-enigma.t
new file mode 100644
index 0000000..0760737
--- /dev/null
+++ b/t/basic-enigma.t
@@ -0,0 +1,28 @@
+#!perl
+use DAKKAR::p 'test';
+use Test::Enigmatic;
+use Enigmatic::Machine;
+
+Test::Enigmatic::test_full_machine(
+ sub {
+ Enigmatic::Machine->new({
+ reflector => 'B',
+ rotors => [ 'III', 'II', 'I' ],
+ });
+ },
+ 'AAAAA',
+ 'BDZGO');
+
+Test::Enigmatic::test_full_machine(
+ sub {
+ Enigmatic::Machine->new({
+ reflector => 'B',
+ rotors => [ 'III', 'II', 'I' ],
+ ring_settings => ['B','B','B'],
+ });
+ },
+ 'AAAAA',
+ 'EWTYX');
+
+
+done_testing();