Subject: | Patch to generalize t/03 test |
Date: | Sun, 24 Aug 2008 22:04:18 +0200 (CEST) |
To: | bug-Net-Pcap [...] rt.cpan.org |
From: | Havard Eidnes <he [...] NetBSD.org> |
Hi,
while adapting the update of this packae from 0.14 to 0.16 in
NetBSD's pkgsrc system, I found that test 03 didn't know how to
handle NetBSD, so the test failed. I *think* all BSD systems are
the same in this respect, so this is a suggested test:
--- t/03-openlive.t.orig 2007-12-22 20:46:39.000000000 +0100
+++ t/03-openlive.t
@@ -64,7 +64,7 @@ eval { $pcap = Net::Pcap::open_live($fak
is( $@, '', "open_live()" );
if($^O eq 'MSWin32' or $^O eq 'cygwin') {
like( $err, '/^Error opening adapter:/', " - \$err must be set: $err" );
-} elsif($^O eq 'darwin' or $^O eq 'freebsd' or $^O eq 'openbsd') {
+} elsif($^O eq 'darwin' or $^O =~ '.*bsd') {
like( $err, "/^(?:BIOCSETIF: )?$fakedev: Device not configured/", " - \$err must be set: $err" );
} else {
like( $err, '/^(?:bind|ioctl|SIOCGIFHWADDR): (?:No such device)/', " - \$err must be set: $err" );
Best regards,
- Håvard