30 lines
1.0 KiB
Perl
30 lines
1.0 KiB
Perl
#!/usr/bin/env perl
|
|
|
|
use strict;
|
|
use warnings;
|
|
use Test::More;
|
|
use Test::Deep;
|
|
use DDG::Test::Goodie;
|
|
|
|
zci answer_type => 'guid';
|
|
zci is_cached => 0;
|
|
|
|
my @answer = (re(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 =>re(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}$/)});
|
|
|
|
ddg_goodie_test([qw( DDG::Goodie::GUID ) ],
|
|
|
|
# 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),
|
|
'new guid' => test_zci(@answer),
|
|
'random uuid' => test_zci(@answer),
|
|
'generate new uuid' => test_zci(@answer),
|
|
'generate random uuid' => test_zci(@answer),
|
|
'uuid in ansi C' => undef,
|
|
'what is a guid' => undef,
|
|
);
|
|
|
|
done_testing;
|