r64583 - /trunk/libweather-google-perl/debian/patches/no_network.patch
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Fri Nov 5 09:55:57 UTC 2010
Author: periapt-guest
Date: Fri Nov 5 09:55:46 2010
New Revision: 64583
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=64583
Log:
changed patch principle
Modified:
trunk/libweather-google-perl/debian/patches/no_network.patch
Modified: trunk/libweather-google-perl/debian/patches/no_network.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libweather-google-perl/debian/patches/no_network.patch?rev=64583&op=diff
==============================================================================
--- trunk/libweather-google-perl/debian/patches/no_network.patch (original)
+++ trunk/libweather-google-perl/debian/patches/no_network.patch Fri Nov 5 09:55:46 2010
@@ -4,113 +4,112 @@
Last-Update: 2010-11-04
--- a/t/01init.t
+++ b/t/01init.t
-@@ -2,9 +2,15 @@
+@@ -2,8 +2,14 @@
use strict;
use warnings;
-+use Test::More tests => 10;
+-
+-use Test::Simple tests => 10;
++use Test::More;
++if ($ENV{TEST_WITH_NETWORK}) {
++ plan tests => 10;
++}
++else {
++ plan skip_all => "ignoring tests that depend on network";
++ exit(0);
++}
--use Test::Simple tests => 10;
-+SKIP: {
-
-+use Net::Ping;
-+my $p = Net::Ping->new;
-+if (not $p->ping('http://www.google.com')) {
-+ skip "no network", 10;
-+}
use Weather::Google;
- my $w = new Weather::Google;
-@@ -22,3 +28,5 @@
+@@ -22,3 +28,4 @@
ok ( $g = new Weather::Google('Beverly Hills, CA'), 'new(city)');
ok( defined $g );
ok( $g->isa('Weather::Google') );
+
-+}
--- a/t/02current_conditions.t
+++ b/t/02current_conditions.t
-@@ -5,6 +5,13 @@
+@@ -1,10 +1,16 @@
+-#!/usr/bin/perl -Tw
++#!/usr/bin/perl -w
- use Test::More tests => 41;
+ use strict;
+ use warnings;
-+SKIP: {
-+
-+use Net::Ping;
-+my $p = Net::Ping->new;
-+if (not $p->ping('http://www.google.com')) {
-+ skip "no network", 41;
+-use Test::More tests => 41;
+-
++use Test::More;
++if ($ENV{TEST_WITH_NETWORK}) {
++ plan tests => 41;
++}
++else {
++ plan skip_all => "ignoring tests that depend on network";
++ exit(0);
+}
use Weather::Google;
my $g = new Weather::Google(90210);
-@@ -37,4 +44,4 @@
+@@ -37,4 +43,3 @@
ok( @b = $g->current(@test) );
is( @a, @b, "Arrays work" );
-
-+}
--- a/t/03forecast_conditions.t
+++ b/t/03forecast_conditions.t
-@@ -6,6 +6,13 @@
+@@ -6,6 +6,10 @@
use Weather::Google;
use Test::More;
-+use Net::Ping;
-+my $p = Net::Ping->new;
-+if (not $p->ping('http://www.google.com')) {
-+ plan skip_all => "no network";
++if (not $ENV{TEST_WITH_NETWORK}) {
++ plan skip_all => "ignoring tests that depend on network";
+ exit(0);
+}
-+
# There are 5+3(n)+(3*11)(n) tests.
-@@ -73,4 +80,3 @@
+@@ -73,4 +77,3 @@
ok( @b = $g->forecast($m, at test) );
is( @a, @b, "Arrays work" );
}
-
--- a/t/04forecast_information.t
+++ b/t/04forecast_information.t
-@@ -5,6 +5,13 @@
+@@ -3,8 +3,15 @@
+ use strict;
+ use warnings;
- use Test::More tests => 26;
+-use Test::More tests => 26;
++use Test::More;
-+SKIP: {
-+
-+use Net::Ping;
-+my $p = Net::Ping->new;
-+if (not $p->ping('http://www.google.com')) {
-+ skip "no network", 26;
++if ($ENV{TEST_WITH_NETWORK}) {
++ plan tests => 26;
++}
++else {
++ plan skip_all => "ignoring tests that depend on network";
++ exit(0);
+}
use Weather::Google;
my $g = new Weather::Google(90210);
-@@ -35,4 +42,4 @@
+@@ -35,4 +42,3 @@
ok( @b = $g->info(@test) );
is( @a, @b, "Arrays work" );
-
-+}
--- a/t/05language.t
+++ b/t/05language.t
-@@ -4,6 +4,14 @@
+@@ -3,7 +3,14 @@
+ use strict;
use warnings;
- use Test::More tests => 12;
-+
-+SKIP: {
-+
-+use Net::Ping;
-+my $p = Net::Ping->new;
-+if (not $p->ping('http://www.google.com')) {
-+ skip "no network", 12;
+-use Test::More tests => 12;
++use Test::More;
++if ($ENV{TEST_WITH_NETWORK}) {
++ plan tests => 12;
++}
++else {
++ plan skip_all => "ignoring tests that depend on network";
++ exit(0);
+}
use Test::Warn;
use Weather::Google;
-@@ -50,3 +58,4 @@
-
- # 7
- is($gw->language(), undef, "set unsupported language via language(): not set");
-+}
More information about the Pkg-perl-cvs-commits
mailing list