Added tests for Rot13

master
Dylan Lloyd 2012-05-05 13:43:57 -04:00
parent 68f0cf4cd9
commit 3e9e679d7f
2 changed files with 22 additions and 0 deletions

View File

@ -34,6 +34,7 @@ ddg_goodie_test(
DDG::Goodie::PublicDNS
DDG::Goodie::Reverse
DDG::Goodie::Roman
DDG::Goodie::Rot13
DDG::Goodie::SigFigs
DDG::Goodie::TitleCase
DDG::Goodie::Unicode
@ -130,6 +131,9 @@ ddg_goodie_test(
# Roman
'roman 155' => test_zci('CLV (roman numeral conversion)', answer_type => 'roman_numeral_conversion', is_cached => 1),
# Rot13
'rot13 This is a test.' => test_zci('ROT13: Guvf vf n grfg.', answer_type => 'rot13', is_cached => 1),
# SigFigs
'sf 78' => test_zci('Significant figures: 2', answer_type => 'sig_figs', is_cached => 1),

18
t/Rot13.t Normal file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 'rot13';
zci is_cached => 1;
ddg_goodie_test(
[qw(
DDG::Goodie::Rot13
)],
'rot13 This is a test' => test_zci('ROT13: Guvf vf n grfg'),
);
done_testing;