From 2b28ab91084f37a5e9014737d0df694587fe60cf Mon Sep 17 00:00:00 2001 From: dakkar Date: Mon, 29 Aug 2011 19:16:26 +0100 Subject: fixed rotor ring settings and removed debug prints --- t/simple-enigma.t | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 't/simple-enigma.t') 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(); -- cgit v1.2.3