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)],
|
2014-07-07 10:42:56 -07:00
|
|
|
'Anagram filter' => test_zci('trifle', html => qr/.*/),
|
|
|
|
'anagrams events' => test_zci('Steven', html => qr/.*/),
|
|
|
|
'anagram of algorithm' => test_zci('logarithm', html => qr/.*/),
|
|
|
|
'anagrams of favorite' => test_zci(qr/[favorite]{8}/, html => qr/.*/),
|
|
|
|
'anagram of' => test_zci(qr/(of|fo)/, html => qr/.*/),
|
|
|
|
'anagram filter 5' => test_zci('filet, flier, flirt, lifer, liter, refit, rifle', html => qr/.*/),
|
|
|
|
'anagram times' => test_zci('emits, items, mites, smite', html => qr/.*/),
|
|
|
|
'anagram Mixing it up' => test_zci(qr/[ Mixngtup]{12}/, html => qr/.*/),
|
|
|
|
'anagram algorithm 14' => test_zci('logarithm', html => qr/.*/),
|
2014-07-07 11:24:25 -07:00
|
|
|
'anagrams stop' => test_zci('Post, opts, post, pots, spot, tops', html => qr/.*/),
|
|
|
|
'anagram stop' => test_zci('Post, opts, post, pots, spot, tops', html => qr/.*/),
|
|
|
|
'anagrams lost' => test_zci('lots, slot', html => qr/.*/),
|
|
|
|
'anagram lost' => test_zci('lots, slot', html => qr/.*/),
|
|
|
|
'anagram of lost' => test_zci('lots, slot', html => qr/.*/),
|
2014-07-07 10:42:56 -07:00
|
|
|
'anagram of filter' => test_zci('trifle', html => qr/.*/),
|
2014-07-07 11:24:25 -07:00
|
|
|
'anagram of Filter' => test_zci('trifle', html => qr/.*/),
|
2014-02-10 13:24:52 -08:00
|
|
|
);
|
2013-02-28 22:13:21 -08:00
|
|
|
|
|
|
|
done_testing;
|