Added tests for Base64, Dice, EmToPx, FlipText, GoldenRatio, Guid, Periemeter, Roman, SigFigs, TitleCase, Unicode
2012-04-15 16:17:12 -07:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Test::More;
|
|
|
|
use DDG::Test::Goodie;
|
|
|
|
|
|
|
|
zci answer_type => 'dice_roll';
|
|
|
|
zci is_cached => 0;
|
|
|
|
|
|
|
|
ddg_goodie_test(
|
|
|
|
[qw(
|
|
|
|
DDG::Goodie::Dice
|
|
|
|
)],
|
2012-05-29 15:40:32 -07:00
|
|
|
'throw dice' => test_zci(qr/^\d \d$/),
|
|
|
|
"roll 5 dice" => test_zci(qr/\d \d \d \d \d/),
|
|
|
|
"throw die" => test_zci(qr/^\d$/),
|
2012-06-11 13:50:11 -07:00
|
|
|
"roll 2d6" => test_zci(qr/^\d (\+|-) \d = \d+$/),
|
|
|
|
"roll 3d12 + 4" => test_zci(qr/^\d{1,2} (\+|-) \d{1,2} (\+|-) \d{1,2} (\+|-) \d{1,2} = \d{1,2}$/),
|
2012-05-29 15:40:32 -07:00
|
|
|
"throw 1d20" => test_zci(qr/\d{1,2}$/),
|
2012-06-27 18:07:01 -07:00
|
|
|
"roll 3d8 - 8" => test_zci(qr/^\d (\+|-) \d (\+|-) \d (\+|-) \d = -?\d+$/),
|
2012-05-29 15:40:32 -07:00
|
|
|
"roll d20" => test_zci(qr/^\d{1,2}$/),
|
Added tests for Base64, Dice, EmToPx, FlipText, GoldenRatio, Guid, Periemeter, Roman, SigFigs, TitleCase, Unicode
2012-04-15 16:17:12 -07:00
|
|
|
);
|
|
|
|
|
|
|
|
done_testing;
|