zeroclickinfo-goodies/t/Regexp.t

32 lines
651 B
Perl
Raw Normal View History

2013-03-11 13:27:50 -07:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 'regexp';
ddg_goodie_test(
[qw( DDG::Goodie::Regexp )],
'regexp /(hello\s)/ hello probably' => test_zci(
"hello ",
heading => 'Regexp Result',
2013-03-11 13:27:50 -07:00
),
'regexp /(dd)/ ddg' => test_zci(
"dd",
heading => 'Regexp Result',
2013-03-11 13:27:50 -07:00
),
'regex /(poss)/ many possibilities' => test_zci(
"poss",
heading => 'Regexp Result',
),
'regexp /(.*)/ ddg' => test_zci(
'ddg',
heading => 'Regexp Result'
),
2013-03-11 13:27:50 -07:00
);
done_testing;