~ubuntu-branches/debian/sid/botan/sid

« back to all changes in this revision

Viewing changes to src/contrib/perl-xs/t/filt.t

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2018-03-01 22:23:25 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20180301222325-7p7vc45gu3hta34d
Tags: 2.4.0-2
* Don't remove .doctrees from the manual if it doesn't exist.
* Don't specify parallel to debhelper.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# vim: set ft=perl:
 
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'
 
4
 
 
5
######################### We start with some black magic to print on failure.
 
6
 
 
7
# Change 1..1 below to 1..last_test_to_print .
 
8
# (It may become useful if the test is moved to ./t subdirectory.)
 
9
 
 
10
BEGIN { $| = 1; print "1..5\n"; }
 
11
END { print "not ok 1\n" unless $loaded; }
 
12
 
 
13
use Botan;
 
14
 
 
15
$loaded = 1;
 
16
print "ok 1\n";
 
17
 
 
18
######################### End of black magic.
 
19
 
 
20
# Insert your test code below (better if it prints "ok 13"
 
21
# (correspondingly "not ok 13") depending on the success of chunk 13
 
22
# of the test code):
 
23
 
 
24
use strict;
 
25
 
 
26
my $pipe = Botan::Pipe->new(Botan::Hex_Encoder->new());
 
27
 
 
28
print "not " unless $pipe;
 
29
print "ok 2\n";
 
30
 
 
31
$pipe->process_msg('FOO');
 
32
 
 
33
print "not " if $pipe->read() ne '464F4F';
 
34
print "ok 3\n";
 
35
 
 
36
$pipe = Botan::Pipe->new(Botan::Hex_Encoder->new(0, 0, 1));
 
37
 
 
38
print "not " unless $pipe;
 
39
print "ok 4\n";
 
40
 
 
41
$pipe->process_msg('FOO');
 
42
 
 
43
print "not " if $pipe->read() ne '464f4f';
 
44
print "ok 5\n";
 
45
 
 
46
 
 
47
 
 
48
 
 
49
 
 
50
 
 
51
#my $pipe = Botan::Pipe->new(Botan::Base64_Encoder->new());
 
52
#$pipe->process_msg('FOO');
 
53
#
 
54
#print "not " if $pipe->read() ne 'Rk9P';
 
55
#print "ok 4\n";
 
56