summaryrefslogtreecommitdiff
path: root/t/simple-enigma.t
diff options
context:
space:
mode:
Diffstat (limited to 't/simple-enigma.t')
-rw-r--r--t/simple-enigma.t15
1 files changed, 6 insertions, 9 deletions
diff --git a/t/simple-enigma.t b/t/simple-enigma.t
index b2bcbdd..889f0c0 100644
--- a/t/simple-enigma.t
+++ b/t/simple-enigma.t
@@ -1,6 +1,6 @@
#!perl
use DAKKAR::p 'test';
-
+use Test::Enigmatic;
use Enigmatic::Machine;
sub real_machine {
@@ -13,11 +13,8 @@ sub real_machine {
});
}
-my $plaintext = 'this is a simple text to be encrypted by an enigma machine'->uc;
-note "encrypt simple";
-my $ciphertext = real_machine->map_string($plaintext);note $ciphertext;
-note "decrypt simple";
-my $check = real_machine->map_string($ciphertext);note $check;
-$plaintext =~ s{\s+}{}g;
-is($check,$plaintext,
- 'round tripped');
+Test::Enigmatic::test_full_machine(
+ \&real_machine,
+ 'this is a simple text to be encrypted by an enigma machine');
+
+done_testing();