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;
|
|
|
|
|
2015-01-09 00:46:54 -08:00
|
|
|
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),
|
2014-12-25 04:06:55 -08:00
|
|
|
'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;
|