File: basic.t

package info (click to toggle)
libcrypt-sysrandom-xs-perl 0.009-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 132 kB
  • sloc: perl: 108; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 319 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! perl

use strict;
use warnings;

use Test::More;

use Crypt::SysRandom::XS 'random_bytes';

my $first = random_bytes(16);

is length $first, 16, '$first is 16 bytes';
isnt $first, scalar("\0" x 16), "\$first isn't empty";

my $second = random_bytes(16);

isnt $first, $second, "\$first isn't second";

done_testing;