File: time_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 (27 lines) | stat: -rw-r--r-- 471 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
25
26
27
#
# test the time() function.
#
# this really tests the statement that times returned
# from other than v1, v6, and v7 are always 0.
#
use strict;
use warnings;
use Test::More;
use MyNote;
use UUID 'generate_v3';

ok 1, 'loaded';

my $sys_time = time;

generate_v3(my $u0, dns => 'www.example.com');

my $uid_time = UUID::time($u0);
note scalar localtime($uid_time);

note 'uid time ', $uid_time;
note 'sys time ', $sys_time;

is $uid_time, 0, 'always 0';

done_testing;