File: zbugfixes.t

package info (click to toggle)
libgssapi-perl 0.28-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 412 kB
  • sloc: perl: 758; makefile: 6
file content (40 lines) | stat: -rwxr-xr-x 1,267 bytes parent folder | download | duplicates (4)
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
32
33
34
35
36
37
38
39
40

use strict;

use ExtUtils::testlib;

use GSSAPI qw(:all);
use Test::More tests => 3;



#--------------------------------------------------------
{
   my ($name, $display);
   my $keystring = 'chpasswd@mars.gac.edu';
   my $status = GSSAPI::Name->import($name, $keystring);
   ok ( $status, 'GSSAPI::Name->import() ' . $status );
   SKIP: {
       if ( $status->major != GSS_S_COMPLETE  ) {
           skip('GSSAPI::Name->import() failed ' . $status, 2 );
       }

       my $status = $name->display($display);
       #
       # The lc is needed for implementations that uppercase
       # the realm - part of $display
       # see <http://rt.cpan.org/Public/Bug/Display.html?id=18531>
       #
       ok ( $status, '$name->display() GSS_S_COMPLETE ' . $status);
       SKIP: {
           if ( $status->major != GSS_S_COMPLETE  ) {
             skip('$name->display() failed', 1 );
           }
           cmp_ok ( lc $display, 'eq', $keystring, 'check bugfix of <http://rt.cpan.org/Public/Bug/Display.html?id=5681>');
       }
   }
}
diag( "\n\n if you want to run tests that do a realworld *use* of your GSSAPI",
      "\n start a kinit and try to run",
      "\n\n./examples/getcred_hostbased.pl \n\n" );
#--------------------------------------------------------