File: network_tests.patch

package info (click to toggle)
liblivejournal-perl 1.3-6.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 260 kB
  • sloc: perl: 757; makefile: 4
file content (23 lines) | stat: -rw-r--r-- 597 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: add variable to turn off network tests
Forwarded: no
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2011-02-11

--- liblivejournal-perl-1.3.orig/t/lj.t
+++ liblivejournal-perl-1.3/t/lj.t
@@ -2,12 +2,14 @@
 
 # $Id: lj.t,v 1.2 2001/03/15 23:11:31 archon Exp $
 
-BEGIN { $| = 1; print "1..3\n"; }
+BEGIN { $| = 1; my $tests = ( $ENV{NO_NETWORK} ? 1 : 3 ); print "1..$tests\n"; }
 END {print "not ok 1\n" unless $loaded;}
 use LiveJournal;
 $loaded = 1;
 print "ok 1\n";
 
+exit if $ENV{NO_NETWORK};
+
 # we just want to try login()
 my $login = "bogus";
 my $pass = "bogus";