File: proc.t

package info (click to toggle)
libcrypt-random-source-perl 0.14-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 360 kB
  • sloc: perl: 556; sh: 6; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 368 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
use warnings;

use Test::More 0.88;
use Test::Fatal;

use ok 'Crypt::Random::Source::Base::Proc';

{
    my $p = Crypt::Random::Source::Base::Proc->new( command => [qw( echo foo bar )] );

    is( $p->get(3), 'foo', "got data" );

    like exception { $p->get(50) }, qr/enough bytes/, "not having enough data is fatal";
}

done_testing;
# ex: set sw=4 et: