]> eyrie.org Git - kerberos/perl-kerberos.git/commitdiff
Clean up style and critic issues in the test suite
authorRuss Allbery <eagle@eyrie.org>
Fri, 28 Feb 2014 23:55:21 +0000 (15:55 -0800)
committerRuss Allbery <eagle@eyrie.org>
Fri, 28 Feb 2014 23:55:21 +0000 (15:55 -0800)
t/data/kdb/password-quality
t/kadmin/heimdal.t

index 570d63c15e021a8ec1274651ae8e9ae6b4b63ca4..ccc7f22626795e8552728107193867ee222bfadd 100755 (executable)
@@ -29,11 +29,13 @@ use 5.010;
 use strict;
 use warnings;
 
+# No, really, we have to use standard input.
+## no critic (InputOutput::ProhibitExplicitStdin)
+
 # Check whether the password is "password".
 while (defined(my $line = <STDIN>)) {
     if ($line =~ m{ \A new-password: [ ] password \n \z }xms) {
-        warn "weak password\n"
-          or die "Cannot write to standard output: $!\n";
+        warn "weak password\n";
         exit(0);
     }
 }
index 70c55cd20d9466c4d235bf9ae934631b5323977c..9b90b63b808a3536b34de165e611f178a4e61f40 100755 (executable)
@@ -55,9 +55,9 @@ local $ENV{KRB5_CONFIG} = 't/data/kdb/kdc.conf';
 # Create the Authen::Kerberos::Kadmin object.
 my $kadmin = Authen::Kerberos::Kadmin->new(
     {
-        realm   => 'TEST.EXAMPLE.COM',
-        server  => 1,
         password_quality => 1,
+        realm            => 'TEST.EXAMPLE.COM',
+        server           => 1,
     }
 );
 isa_ok($kadmin, 'Authen::Kerberos::Kadmin');
@@ -91,8 +91,8 @@ is(
 # The same should fail if we attempt it with an unknown database.
 $kadmin = Authen::Kerberos::Kadmin->new(
     {
-        realm   => 'BOGUS.EXAMPLE.COM',
-        server  => 1,
+        realm  => 'BOGUS.EXAMPLE.COM',
+        server => 1,
     }
 );
 ok(!eval { $kadmin->chpass('test@TEST.EXAMPLE.COM', 'some password') },