From b60c14a7c14115fb7fe550b62169566311f28c1f Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Mon, 15 Sep 2014 17:19:43 -0700 Subject: [PATCH] t/q-base, s/utils/base/ --- t/qpsmtpd-base.t | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/t/qpsmtpd-base.t b/t/qpsmtpd-base.t index 24cdc9f..f307a0d 100644 --- a/t/qpsmtpd-base.t +++ b/t/qpsmtpd-base.t @@ -8,7 +8,7 @@ use lib 'lib'; # test lib/Qpsmtpd/Base (vs site_perl) BEGIN { use_ok('Qpsmtpd::Base'); } -my $utils = bless {}, 'Qpsmtpd::Base'; +my $base = bless {}, 'Qpsmtpd::Base'; __tildeexp(); __is_localhost(); @@ -19,30 +19,30 @@ done_testing(); sub __is_valid_ip { my @good = qw/ 1.2.3.4 1.0.0.0 254.254.254.254 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff /; foreach my $ip ( @good ) { - ok( $utils->is_valid_ip($ip), "is_valid_ip: $ip"); + ok( $base->is_valid_ip($ip), "is_valid_ip: $ip"); } my @bad = qw/ 1.2.3.256 256.1.1.1 2001:db8:ffff:ffff:ffff:ffff:ffff:fffj /; foreach my $ip ( @bad ) { - ok( !$utils->is_valid_ip($ip), "is_valid_ip, neg: $ip"); + ok( !$base->is_valid_ip($ip), "is_valid_ip, neg: $ip"); } }; sub __is_localhost { for my $local_ip (qw/ 127.0.0.1 ::1 2607:f060:b008:feed::127.0.0.1 127.0.0.2 /) { - ok( $utils->is_localhost($local_ip), "is_localhost, $local_ip"); + ok( $base->is_localhost($local_ip), "is_localhost, $local_ip"); } for my $rem_ip (qw/ 128.0.0.1 ::2 2607:f060:b008:feed::128.0.0.1 /) { - ok( !$utils->is_localhost($rem_ip), "!is_localhost, $rem_ip"); + ok( !$base->is_localhost($rem_ip), "!is_localhost, $rem_ip"); } }; sub __tildeexp { - my $path = $utils->tildeexp('~root/foo.txt'); + my $path = $base->tildeexp('~root/foo.txt'); ok( $path, "tildeexp, $path"); - $path = $utils->tildeexp('no/tilde/in/path'); + $path = $base->tildeexp('no/tilde/in/path'); cmp_ok( $path, 'eq', 'no/tilde/in/path', 'tildeexp, no expansion'); };