2013-02-28 22:13:21 -08:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Test::More;
|
|
|
|
use DDG::Test::Goodie;
|
|
|
|
|
2013-03-01 08:14:55 -08:00
|
|
|
zci answer_type => 'anagram';
|
2013-02-28 22:13:21 -08:00
|
|
|
zci is_cached => 0;
|
|
|
|
|
|
|
|
ddg_goodie_test(
|
2013-03-01 08:14:55 -08:00
|
|
|
[qw(DDG::Goodie::Anagram)],
|
2013-03-01 21:47:00 -08:00
|
|
|
'Anagram filter' => test_zci('Anagram of "filter": trifle'),
|
|
|
|
'anagrams events' => test_zci('Anagram of "events": Steven'),
|
|
|
|
'anagram of algorithm' => test_zci('Anagram of "algorithm": logarithm'),
|
|
|
|
'anagrams of favorite' => test_zci(qr/"favorite" scrambled: [favorite]{8}/),
|
|
|
|
'anagram of' => test_zci(qr/"of" scrambled: (of|fo)/),
|
|
|
|
'anagram filter 5' => test_zci('Anagrams of "filter" of size 5: filet, flier, flirt, lifer, liter, refit, rifle'),
|
|
|
|
'anagram times' => test_zci('Anagrams of "times": emits, items, mites, smite'),
|
|
|
|
'anagram Mixing it up' => test_zci(qr/"Mixing it up" scrambled: [ Mixngtup]{12}/),
|
2013-03-02 09:15:04 -08:00
|
|
|
'anagram algorithm 14' => test_zci('Anagram of "algorithm": logarithm'),
|
|
|
|
"anagrams stop" => test_zci('Anagrams of "stop": Post, opts, post, pots, spot, tops'),
|
|
|
|
"anagram stop" => test_zci('Anagrams of "stop": Post, opts, post, pots, spot, tops'),
|
|
|
|
"anagrams lost" => test_zci('Anagrams of "lost": lots, slot'),
|
|
|
|
"anagram lost" => test_zci('Anagrams of "lost": lots, slot'),
|
|
|
|
"anagram of lost" => test_zci('Anagrams of "lost": lots, slot'),
|
2013-02-28 22:13:21 -08:00
|
|
|
);
|
|
|
|
|
|
|
|
done_testing;
|