1#! /usr/bin/perl -w 2 3use strict; 4 5use ExtUtils::testlib; 6use Test::More tests => 6; 7 8BEGIN { 9 use_ok('GSSAPI'); 10} 11 12my($name); 13 14my $status = GSSAPI::Name->import( $name, 'chpasswd@mars.gac.edu' ); 15 16SKIP: { 17 unless ($status->major == GSS_S_COMPLETE ) { 18 # 19 # As an anwer to FAIL 413320 20 # <http://www.nntp.perl.org/group/perl.cpan.testers/2007/02/msg413320.html> 21 # we always printout why the GSSAPI call failed 22 # to decide between general Kerberos (configuration) 23 # problems on the machine that runs the test and 24 # problems of the permodule itself. 25 # 26 skip( '->import() failed ' . $status, 5 ); 27 } 28 my ( $name2, $same ); 29 ok( $status , q{ GSSAPI::Name->import( $name, 'chpasswd@mars.gac.edu' } ); 30 ok( ref $name eq "GSSAPI::Name", 'ref $name eq "GSSAPI::Name"'); 31 $status = $name->duplicate($name2); 32 ok( $status->major == GSS_S_COMPLETE, '$name->duplicate($name2) ' . $status ); 33 $status = $name->compare($name2, $same); 34 ok($status->major == GSS_S_COMPLETE, '$name->compare($name2, $same) ' . $status ); 35 eval { 36 $status = $name->compare($name2, 0); 37 }; 38 ok( $@ =~ /Modification of a read-only value/ , 'Modification of a read-only value'); 39}