File: tests-internet.patch

package info (click to toggle)
libhttp-tiny-perl 0.050-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 696 kB
  • ctags: 74
  • sloc: perl: 2,647; makefile: 6
file content (20 lines) | stat: -rw-r--r-- 656 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: run new test which needs internet access only conditionally
Origin: vendor
Forwarded: not-needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2014-07-19

--- a/t/002_croakage.t
+++ b/t/002_croakage.t
@@ -43,9 +43,11 @@ for my $c ( @cases ) {
   like ($err, qr/\Q$usage{$method}\E/, join("|",@$c) );
 }
 
+if ( $ENV{HAVE_INTERNET} ) {
 my $res = eval{ $http->get("http://www.example.com/", { headers => { host => "www.example2.com" } } ) };
 is( $res->{status}, 599, "Providing a Host header errors with 599" );
 like( $res->{content}, qr/'Host' header/, "Providing a Host header gives right error message" );
+}
 
 done_testing;