File: v3.t

package info (click to toggle)
libuuid-perl 0.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,092 kB
  • sloc: ansic: 2,374; perl: 580; makefile: 5
file content (24 lines) | stat: -rw-r--r-- 384 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#
# v3 should be all dupes.
#
use strict;
use warnings;
use Test::More;
use MyNote;
BEGIN { use_ok 'UUID' }

my $n = 100;
my %seen = ();

for (1 .. $n) {
    my ($bin, $str);
    UUID::generate_v3($bin, dns => 'www.example.com');
    UUID::unparse($bin, $str);
    note $str;
    #ok !exists($seen{$str});
    $seen{$str} = 1;
}

is scalar(keys %seen), 1, 'all dupes';

done_testing;