File: get_octet.t

package info (click to toggle)
libdata-entropy-perl 0.004-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 228 kB
  • ctags: 80
  • sloc: perl: 891; makefile: 89
file content (17 lines) | stat: -rw-r--r-- 432 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use Test::More tests => 2051;

use IO::File 1.03;

BEGIN { use_ok Data::Entropy::Source; }

my $rawsource = IO::File->new("t/test0.entropy", "r") or die $!;
my $source = Data::Entropy::Source->new($rawsource, "getc");
ok $source;
$rawsource = IO::File->new("t/test0.entropy", "r") or die $!;

until($rawsource->eof) {
	is $source->get_octet, $rawsource->getc;
}

eval { $source->get_octet; };
like $@, qr/\Aentropy source failed:/;