zeroclickinfo-goodies/t/Coin.t

27 lines
806 B
Perl
Raw Normal View History

2013-02-09 10:19:53 -08:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 'coin';
zci is_cached => 0;
ddg_goodie_test(
[qw(
DDG::Goodie::Coin
)],
'flip a coin' => test_zci(qr/(heads|tails) \(random\)/),
'flip 1 coin' => test_zci(qr/(heads|tails) \(random\)/),
'flip 2 coins' => test_zci(qr/(heads|tails), (heads|tails) \(random\)/),
'toss a coin' => test_zci(qr/(heads|tails) \(random\)/),
'toss 1 coin' => test_zci(qr/(heads|tails) \(random\)/),
'toss 2 coins' => test_zci(qr/(heads|tails), (heads|tails) \(random\)/),
'heads or tails' => test_zci(qr/(heads|tails) \(random\)/),
'heads or tails?' => test_zci(qr/(heads|tails) \(random\)/),
'flip 4 coins' => test_zci(qr/((heads|tails),? ){4}\(random\)/),
2013-02-09 10:19:53 -08:00
);
done_testing;