2015-03-15 15:09:31 -07:00
#!/usr/bin/env perl
use strict ;
use warnings ;
use Test::More ;
use DDG::Test::Goodie ;
zci answer_type = > "brt" ;
zci is_cached = > 1 ;
ddg_goodie_test (
[ qw( DDG::Goodie::BRT ) ] ,
"brt 123456789012" = > test_zci (
"123456789012" ,
2015-03-20 08:02:08 -07:00
structured_answer = > {
input = > [] ,
operation = > 'Shipment tracking available at <a href="http://as777.brt.it/vas/sped_det_show.htm?referer=sped_numspe_par.htm&Nspediz=123456789012&RicercaNumeroSpedizione=Ricerca">BRT</a>.' ,
result = > '123456789012'
}
2015-03-15 15:09:31 -07:00
) ,
"brt 1234567890123456789" = > test_zci (
"1234567890123456789" ,
2015-03-20 08:02:08 -07:00
structured_answer = > {
input = > [] ,
operation = > 'Shipment tracking available at <a href="http://as777.brt.it/vas/sped_det_show.htm?brtCode=1234567890123456789&urltype=a">BRT</a>.' ,
result = > '1234567890123456789'
}
2015-03-15 15:09:31 -07:00
) ,
"brt 1234" = > undef ,
2015-03-20 08:02:08 -07:00
"brt 12345678901234567890" = > undef
2015-03-15 15:09:31 -07:00
) ;
done_testing ;