Hallo chromatic,
Am 2001-11-03 um 09:01 schriebst du:
> On Friday 02 November 2001 14:01, Graham Barr wrote:
>> Hm,
>>
>> It would seem that inet_aton('') on cygwin does not return an error
> Bug in Socket.c on Cygwin or bug in the test?
This patch isn't compatible with the t/config.t I have here...
The Patch:
==========
--- t/~config.t Sat Nov 3 00:55:14 2001
+++ t/config.t Sat Nov 3 00:55:18 2001
@@ -18,7 +18,7 @@
# this calls inet_aton in the mock Socket, so it *may* not be portable
$NetConfig{'ftp_firewall'} = 1;
-is( Net::Config->requires_firewall, -1,
+is( Net::Config->requires_firewall(0), -1,
'... should return -1 without a valid hostname' );
# use the mock Socket to resolve addresses our way
And the config.t I have here, line 18,8 (no comments):
@@ -18,8 +18,8 @@
undef $NetConfig{'ftp_firewall'};
is( Net::Config->requires_firewall(), 0,
'requires_firewall() should return 0 without ftp_firewall defined' );
$NetConfig{'ftp_firewall'} = 1;
is( Net::Config->requires_firewall(''), -1,
'... should return -1 without a valid hostname' );
After applying it:
==================
$ PERL_DL_NONLAZY=1 /bin/perl -Iblib/arch -Iblib/lib
-I/usr/lib/perl5/5.6.1/cygwin-multi
-I/usr/lib/perl5/5.6.1 t/config.t
1..10
ok 1 # Net::Config should have been used
ok 2 # snpp_hosts
ok 3 # requires_firewall() should return 0 without ftp_firewall defined
not ok 4 # ... should return -1 without a valid hostname
Got: '0'
Expected: '-1'
main t/config.t 24
ok 5 # ... should return 0 without local_netmask defined
ok 6 # ... should return false if host is within netmask
ok 7 # ... should return true if host is outside netmask
ok 8 # ... should find success with mutiple local netmasks
ok 9 # ... should handle failure with multiple local netmasks
ok 10 # is_external() should be an alias for requires_firewall()
Ciao,
Gerrit P. Haase mailto:[EMAIL PROTECTED]
--
=^..^=