File: anon.t

package info (click to toggle)
libauthen-sasl-perl 2.1900-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 328 kB
  • sloc: perl: 2,249; makefile: 7
file content (31 lines) | stat: -rw-r--r-- 568 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!perl

use Test::More tests => 5;

use Authen::SASL qw(Perl);

my $sasl = Authen::SASL->new(
  mechanism => 'ANONYMOUS',
  callback => {
    user => 'gbarr',
    pass => 'fred',
    authname => 'none'
  },
);

ok($sasl, 'new');

is($sasl->mechanism, 'ANONYMOUS', 'mechanism is ANONYMOUS');

my $conn = $sasl->client_new("ldap","localhost");

is($conn->mechanism, 'ANONYMOUS', 'connection mechanism is ANONYMOUS');

my $initial = $conn->client_start;

ok($initial eq 'none', 	'client_start');

my $step = $conn->client_step("xyz");

is($step, 'none', 'client_step');