File: uuid.t

package info (click to toggle)
libtest2-plugin-uuid-perl 0.002001-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 116 kB
  • sloc: perl: 19; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 439 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
use Test2::Plugin::UUID;
use Test2::V0;
use Test2::API qw/intercept context/;

my $events = intercept {
    sub { ok(1) }->();
};

my $uuidrx = qr/^[A-F0-9]{8}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{12}$/;

like(
    $events->[0],
    hash {
        field uuid  => $uuidrx;
        field trace => {uuid => $uuidrx, huuid => $uuidrx};
        field hubs  => [{uuid => $uuidrx}];
        etc;
    },
    "Used uuids"
);

done_testing;