2
# Before `make install' is performed this script should be runnable with
3
# `make test'. After `make install' it should work as `perl test.pl'
5
######################### We start with some black magic to print on failure.
7
# Change 1..1 below to 1..last_test_to_print .
8
# (It may become useful if the test is moved to ./t subdirectory.)
10
BEGIN { $| = 1; print "1..5\n"; }
11
END { print "not ok 1\n" unless $loaded; }
18
######################### End of black magic.
20
# Insert your test code below (better if it prints "ok 13"
21
# (correspondingly "not ok 13") depending on the success of chunk 13
26
my $pipe = Botan::Pipe->new(Botan::Hex_Encoder->new());
28
print "not " unless $pipe;
31
$pipe->process_msg('FOO');
33
print "not " if $pipe->read() ne '464F4F';
36
$pipe = Botan::Pipe->new(Botan::Hex_Encoder->new(0, 0, 1));
38
print "not " unless $pipe;
41
$pipe->process_msg('FOO');
43
print "not " if $pipe->read() ne '464f4f';
51
#my $pipe = Botan::Pipe->new(Botan::Base64_Encoder->new());
52
#$pipe->process_msg('FOO');
54
#print "not " if $pipe->read() ne 'Rk9P';