pf-tools/pf-tools: 2 new changesets

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Sun Sep 19 19:38:15 UTC 2010


details:   http://hg.debian.org/hg/pf-tools/pf-tools/rev/5f8679101947
changeset: 783:5f8679101947
user:      Thomas Parmelan <tom+pf-tools at ankh.fr.EU.org>
date:      Sun Sep 19 01:21:15 2010 +0200
description:
Typo in a test.

details:   http://hg.debian.org/hg/pf-tools/pf-tools/rev/ab95d15f8a51
changeset: 784:ab95d15f8a51
user:      Thomas Parmelan <tom+pf-tools at ankh.fr.EU.org>
date:      Sun Sep 19 01:23:40 2010 +0200
description:
New test for Init_SUBST() + no double negation.

diffstat:

2 files changed, 1 insertion(+), 1 deletion(-)
lib/PFTools/Conf.pm |    1 -
t/13.conf.t         |    1 +

diffs (39 lines):

diff -r 93fb61c9763a -r ab95d15f8a51 lib/PFTools/Conf.pm
--- a/lib/PFTools/Conf.pm	Fri Sep 17 17:09:20 2010 +0200
+++ b/lib/PFTools/Conf.pm	Sun Sep 19 01:23:40 2010 +0200
@@ -204,8 +204,8 @@
 
     $domainname ||= $pf_config->{'location'}->{'zone'} || hostdomain || q{};
 
-    unless( ! ref $hosttype ) {
-        croak qq{ERROR: Hosttype parameter must be a string};
+    if ( ref $hosttype ) {
+        croak q{ERROR: Hosttype parameter must be a string};
     }
 
     my $host_regex = $pf_config->{'regex'}->{'hostname'}
diff -r 93fb61c9763a -r ab95d15f8a51 t/12.storable.t
--- a/t/12.storable.t	Fri Sep 17 17:09:20 2010 +0200
+++ b/t/12.storable.t	Sun Sep 19 01:23:40 2010 +0200
@@ -57,7 +57,7 @@
     => 'Stores something in explicit path even if empty $pf_config';
 
 throws_ok { Flush2disk_GLOBAL($global_config, $pf_config, $store3) }
-    qr{\A ERROR: [ ] can't [ ] create }xms
+    qr{\A ERROR: [ ] Can't [ ] create }xms
     => 'Dies if cannot create';
 
 
diff -r 93fb61c9763a -r ab95d15f8a51 t/13.conf.t
--- a/t/13.conf.t	Fri Sep 17 17:09:20 2010 +0200
+++ b/t/13.conf.t	Sun Sep 19 01:23:40 2010 +0200
@@ -105,6 +105,9 @@
 throws_ok { Init_SUBST( undef, { foo => 1 } ) }
     qr{\A ERROR: [ ] Hosttype [ ] parameter [ ] must [ ] be [ ] a [ ] string }xms
     => 'Dies if $hosttype specified but not a scalar';
+
+lives_ok { Init_SUBST( undef, 'foo' ) }
+    'Accepts a scalar for $hosttype';
 
 throws_ok { Init_SUBST( '1nvalid_hostname!' ) }
     qr{\A ERROR: [ ] Invalid [ ] hostname }xms



More information about the pf-tools-commits mailing list