2015-10-17 11:07:39 -07:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Test::More;
|
|
|
|
use DDG::Test::Goodie;
|
|
|
|
|
2015-10-17 11:53:32 -07:00
|
|
|
zci answer_type => "prime";
|
2015-10-17 11:07:39 -07:00
|
|
|
zci is_cached => 1;
|
|
|
|
|
|
|
|
ddg_goodie_test(
|
|
|
|
[qw( DDG::Goodie::PrimeNumber )],
|
2015-10-17 11:53:32 -07:00
|
|
|
'prime numbers between 4 and 100' => test_zci(qr/(\d{1,3}\,\s\s)+\d{1,3} \(prime numbers\)/,
|
|
|
|
structured_answer => {
|
|
|
|
input => [4, 100],
|
|
|
|
operation => 'Prime numbers between',
|
|
|
|
result => qr/(\d{1,3}\,\s\s)+\d{1,3}/,
|
|
|
|
}
|
|
|
|
),
|
2015-10-17 11:07:39 -07:00
|
|
|
);
|
|
|
|
|
|
|
|
done_testing;
|