r64558 - /trunk/libweather-google-perl/debian/patches/no_network.patch

periapt-guest at users.alioth.debian.org periapt-guest at users.alioth.debian.org
Thu Nov 4 22:44:46 UTC 2010


Author: periapt-guest
Date: Thu Nov  4 22:44:34 2010
New Revision: 64558

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=64558
Log:
completed patch

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=64558&op=diff
==============================================================================
--- trunk/libweather-google-perl/debian/patches/no_network.patch (original)
+++ trunk/libweather-google-perl/debian/patches/no_network.patch Thu Nov  4 22:44:34 2010
@@ -1,3 +1,7 @@
+Author: Nicholas Bamber <nicholas at periapt.co.uk>
+Subject: Skip most tests if there is no network
+Forwarded: not needed
+Last-Update: 2010-11-04
 --- a/t/01init.t
 +++ b/t/01init.t
 @@ -2,9 +2,15 @@
@@ -23,3 +27,91 @@
  ok( $g->isa('Weather::Google') );
 +
 +}
+--- a/t/02current_conditions.t
++++ b/t/02current_conditions.t
+@@ -5,6 +5,13 @@
+ 
+ use Test::More tests => 41;
+ 
++SKIP: {
++
++use Net::Ping;
++my $p = Net::Ping->new;
++if (not $p->ping('http://www.google.com')) {
++    skip "no network", 41;
++}
+ use Weather::Google;
+ 
+ my $g = new Weather::Google(90210);
+@@ -37,4 +44,4 @@
+ ok( @b = $g->current(@test) );
+ is( @a, @b, "Arrays work" );
+ 
+-
++}
+--- a/t/03forecast_conditions.t
++++ b/t/03forecast_conditions.t
+@@ -14,6 +14,13 @@
+ $num_tests = @$num_tests;
+ $num_tests = 5+((3*$num_tests)+(5*14)*($num_tests));
+ plan(tests => $num_tests);
++SKIP: {
++
++use Net::Ping;
++my $p = Net::Ping->new;
++if (not $p->ping('http://www.google.com')) {
++    skip "no network", $num_tests;
++}
+ 
+ ok( $g->can('forecast_conditions'));
+ is( ref $g->forecast_conditions, 'ARRAY', "Array ref");
+@@ -73,4 +80,4 @@
+ 	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 @@
+ 
+ use Test::More tests => 26;
+ 
++SKIP: {
++
++use Net::Ping;
++my $p = Net::Ping->new;
++if (not $p->ping('http://www.google.com')) {
++    skip "no network", 26;
++}
+ use Weather::Google;
+ 
+ my $g = new Weather::Google(90210);
+@@ -35,4 +42,4 @@
+ ok( @b = $g->info(@test) );
+ is( @a, @b, "Arrays work" );
+ 
+-
++}
+--- a/t/05language.t
++++ b/t/05language.t
+@@ -4,6 +4,14 @@
+ 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::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