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';
|
2014-09-27 06:42:57 -07:00
|
|
|
zci is_cached => 1;
|
2013-03-11 13:27:50 -07:00
|
|
|
|
|
|
|
ddg_goodie_test(
|
|
|
|
[qw( DDG::Goodie::Regexp )],
|
2013-03-14 09:01:58 -07:00
|
|
|
'regexp /(hello\s)/ hello probably' => test_zci(
|
|
|
|
"hello ",
|
|
|
|
heading => 'Regexp Result',
|
2013-03-11 13:27:50 -07:00
|
|
|
),
|
|
|
|
'regexp /(dd)/ ddg' => test_zci(
|
2013-03-14 09:01:58 -07:00
|
|
|
"dd",
|
|
|
|
heading => 'Regexp Result',
|
2013-03-11 13:27:50 -07:00
|
|
|
),
|
2013-11-05 05:34:26 -08:00
|
|
|
'regex /(poss)/ many possibilities' => test_zci(
|
|
|
|
"poss",
|
|
|
|
heading => 'Regexp Result',
|
|
|
|
),
|
2014-02-10 13:24:52 -08:00
|
|
|
'regexp /(.*)/ ddg' => test_zci(
|
2014-10-28 11:36:15 -07:00
|
|
|
'ddg',
|
2014-02-10 13:24:52 -08:00
|
|
|
heading => 'Regexp Result'
|
|
|
|
),
|
2013-03-11 13:27:50 -07:00
|
|
|
);
|
|
|
|
|
|
|
|
done_testing;
|
2013-03-14 09:01:58 -07:00
|
|
|
|