File: stdin.patch

package info (click to toggle)
libcgi-application-plugin-linkintegrity-perl 0.06-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 308 kB
  • sloc: perl: 269; sh: 7; makefile: 2
file content (65 lines) | stat: -rw-r--r-- 1,624 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Author: Nicholas Bamber <nicholas@periapt.co.uk>
Subject: test script hangs waiting on STDIN
Forwarded: not-needed
Last-Update: 2011-11-06
--- a/t/02-self_link.t
+++ b/t/02-self_link.t
@@ -59,6 +59,9 @@
     }
 }
 
+local *STDIN;
+open(STDIN, '<', '/dev/null');
+
 $ENV{'REQUEST_METHOD'} = 'POST';
 $ENV{'SERVER_PORT'}    = '80';
 $ENV{'SCRIPT_NAME'}    = '/cgi-bin/app.cgi';
--- a/t/03-path_info_link.t
+++ b/t/03-path_info_link.t
@@ -91,6 +91,9 @@
     }
 }
 
+local *STDIN;
+open(STDIN, '<', '/dev/null');
+
 $ENV{'REQUEST_METHOD'} = 'POST';
 $ENV{'SERVER_PORT'}    = '80';
 $ENV{'SCRIPT_NAME'}    = '/cgi-bin/app.cgi';
--- a/t/05-tampering.t
+++ b/t/05-tampering.t
@@ -88,6 +88,9 @@
 CGI::initialize_globals();
 is(WebApp->new->run, 'rm=link_okay', "[$meth] entry_point (no params) link_okay");
 
+local *STDIN;
+open(STDIN, '<', '/dev/null');
+
 $ENV{'REQUEST_METHOD'} = $meth = 'POST';
 $ENV{'SERVER_PORT'}    = $link->port;
 $ENV{'SCRIPT_NAME'}    = $link->path;
--- a/t/06-built_in_link_tampered_rm.t
+++ b/t/06-built_in_link_tampered_rm.t
@@ -65,6 +65,9 @@
 
 }
 ###########################################################################
+local *STDIN;
+open(STDIN, '<', '/dev/null');
+
 # Build the link
 $ENV{'REQUEST_METHOD'} = 'POST';
 $ENV{'SERVER_PORT'}    = '80';
--- a/t/07-invalid_checksum_hook.t
+++ b/t/07-invalid_checksum_hook.t
@@ -68,6 +68,10 @@
     }
 }
 ###########################################################################
+local *STDIN;
+open(STDIN, '<', '/dev/null');
+
+$ENV{'REQUEST_METHOD'} = 'POST';
 # Build the link
 $ENV{'REQUEST_METHOD'} = 'POST';
 $ENV{'SERVER_PORT'}    = '80';