zeroclickinfo-goodies/t/Rc4.t

33 lines
739 B
Perl
Raw Normal View History

2015-02-23 10:19:45 -08:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => "rc4";
zci is_cached => 1;
ddg_goodie_test(
[qw(
DDG::Goodie::Rc4
)],
'rc4 en mysecretkey hello' => test_zci("Rc4 Encrypt: hello, with key: mysecretkey is grYU1K8=",
2015-02-23 10:19:45 -08:00
structured_answer => {
input => ['hello, Key: mysecretkey'],
operation => "Rc4 Encrypt",
2015-02-23 10:19:45 -08:00
result => "grYU1K8="
}),
'rc4 de duck yWrJniG/nNg=' => test_zci("Rc4 Decrypt: yWrJniG/nNg=, with key: duck is DdgRocks",
2015-02-23 10:19:45 -08:00
structured_answer => {
input => ['yWrJniG/nNg=, Key: duck'],
operation => "Rc4 Decrypt",
2015-02-23 10:19:45 -08:00
result => "DdgRocks"
}),
'rc4 ' => undef,
'rc4 enc missing' => undef,
'rc4 no operation' => undef
);
2015-02-23 10:26:31 -08:00
done_testing;