zeroclickinfo-goodies/t/GUID.t

29 lines
1.0 KiB
Perl
Raw Normal View History

2013-07-24 12:06:17 -07:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 'guid';
zci is_cached => 0;
my @answer = (qr/^([a-zA-Z]|\d){8}-([a-zA-Z]|\d){4}-([a-zA-Z]|\d){4}-([a-zA-Z]|\d){4}-([a-zA-Z]|\d){12}$/, structured_answer => { input =>[], operation => 'Random GUID', result =>qr/^([a-zA-Z]|\d){8}-([a-zA-Z]|\d){4}-([a-zA-Z]|\d){4}-([a-zA-Z]|\d){4}-([a-zA-Z]|\d){12}$/});
2014-01-21 16:37:13 -08:00
2014-10-15 06:46:02 -07:00
ddg_goodie_test([qw( DDG::Goodie::GUID ) ],
2014-01-21 16:37:13 -08:00
2014-10-15 06:46:02 -07:00
# Check that the trigger kicks in.
'guid' => test_zci(@answer),
'uuid' => test_zci(@answer),
'globally unique identifier' => test_zci(@answer),
'rfc 4122' => test_zci(@answer),
2014-12-24 08:13:35 -08:00
'new guid' => test_zci(@answer),
'random uuid' => test_zci(@answer),
'generate new uuid' => test_zci(@answer),
'generate random uuid' => test_zci(@answer),
2014-12-24 08:13:35 -08:00
'uuid in ansi C' => undef,
'what is a guid' => undef,
2013-07-24 12:06:17 -07:00
);
done_testing;