summaryrefslogtreecommitdiff
blob: be9a2aa3e3baaabca1a41f59fb86a73c58a6091c (plain)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
From dd0b1305d9d44167a10e224179a4d25b997dfb8c Mon Sep 17 00:00:00 2001
From: Kent Fredric <kentnl@gentoo.org>
Date: Sun, 17 Dec 2017 20:08:01 +1300
Subject: Disable network-dependent tests when NO_NETWORK_TESTING is defined

---
 t/1-Net-Z3950-ZOOM.t | 6 ++++++
 t/12-query.t         | 6 ++++++
 t/13-resultset.t     | 6 ++++++
 t/14-sorting.t       | 6 ++++++
 t/15-scan.t          | 6 ++++++
 t/16-packages.t      | 6 ++++++
 t/18-charset.t       | 6 ++++++
 t/19-events.t        | 6 ++++++
 t/2-ZOOM.t           | 6 ++++++
 t/22-query.t         | 6 ++++++
 t/23-resultset.t     | 6 ++++++
 t/24-sorting.t       | 6 ++++++
 t/25-scan.t          | 6 ++++++
 t/26-packages.t      | 6 ++++++
 t/28-charset.t       | 6 ++++++
 t/29-events.t        | 6 ++++++
 16 files changed, 96 insertions(+)

diff --git a/t/1-Net-Z3950-ZOOM.t b/t/1-Net-Z3950-ZOOM.t
index a23ba48..673d9c3 100644
--- a/t/1-Net-Z3950-ZOOM.t
+++ b/t/1-Net-Z3950-ZOOM.t
@@ -3,6 +3,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 23;
 BEGIN { use_ok('Net::Z3950::ZOOM') };
 
diff --git a/t/12-query.t b/t/12-query.t
index d21204b..c100699 100644
--- a/t/12-query.t
+++ b/t/12-query.t
@@ -3,6 +3,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 41;
 BEGIN { use_ok('Net::Z3950::ZOOM') };
 
diff --git a/t/13-resultset.t b/t/13-resultset.t
index b3e6225..e8a4eaa 100644
--- a/t/13-resultset.t
+++ b/t/13-resultset.t
@@ -3,6 +3,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 24;
 BEGIN { use_ok('Net::Z3950::ZOOM') };
 
diff --git a/t/14-sorting.t b/t/14-sorting.t
index 341ed44..3f663d4 100644
--- a/t/14-sorting.t
+++ b/t/14-sorting.t
@@ -3,6 +3,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 29;
 use MARC::Record;
 
diff --git a/t/15-scan.t b/t/15-scan.t
index fea22a0..a723e43 100644
--- a/t/15-scan.t
+++ b/t/15-scan.t
@@ -3,6 +3,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 81;
 
 BEGIN { use_ok('Net::Z3950::ZOOM') };
diff --git a/t/16-packages.t b/t/16-packages.t
index 1cdd022..de3ae56 100644
--- a/t/16-packages.t
+++ b/t/16-packages.t
@@ -12,6 +12,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 39;
 
 BEGIN { use_ok('Net::Z3950::ZOOM') };
diff --git a/t/18-charset.t b/t/18-charset.t
index 72e0ead..05fdbd6 100644
--- a/t/18-charset.t
+++ b/t/18-charset.t
@@ -3,6 +3,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 9;
 
 BEGIN { use_ok('Net::Z3950::ZOOM') };
diff --git a/t/19-events.t b/t/19-events.t
index 3c286b2..cecd221 100644
--- a/t/19-events.t
+++ b/t/19-events.t
@@ -3,6 +3,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 23;
 
 BEGIN { use_ok('Net::Z3950::ZOOM') };
diff --git a/t/2-ZOOM.t b/t/2-ZOOM.t
index d644068..e6bda5a 100644
--- a/t/2-ZOOM.t
+++ b/t/2-ZOOM.t
@@ -3,6 +3,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 23;
 BEGIN { use_ok('ZOOM') };
 
diff --git a/t/22-query.t b/t/22-query.t
index 4ffbd63..a5cb283 100644
--- a/t/22-query.t
+++ b/t/22-query.t
@@ -3,6 +3,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 41;
 BEGIN { use_ok('ZOOM') };
 
diff --git a/t/23-resultset.t b/t/23-resultset.t
index 7a026ff..ac0977a 100644
--- a/t/23-resultset.t
+++ b/t/23-resultset.t
@@ -3,6 +3,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 24;
 BEGIN { use_ok('ZOOM') };
 
diff --git a/t/24-sorting.t b/t/24-sorting.t
index e7f1b77..64251ae 100644
--- a/t/24-sorting.t
+++ b/t/24-sorting.t
@@ -3,6 +3,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 29;
 use MARC::Record;
 
diff --git a/t/25-scan.t b/t/25-scan.t
index 01aba9e..042e0ab 100644
--- a/t/25-scan.t
+++ b/t/25-scan.t
@@ -3,6 +3,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 81;
 
 BEGIN { use_ok('ZOOM') };
diff --git a/t/26-packages.t b/t/26-packages.t
index e60b5f3..eb7f7b3 100644
--- a/t/26-packages.t
+++ b/t/26-packages.t
@@ -3,6 +3,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 39;
 
 BEGIN { use_ok('ZOOM') };
diff --git a/t/28-charset.t b/t/28-charset.t
index 16773f0..6abe21d 100644
--- a/t/28-charset.t
+++ b/t/28-charset.t
@@ -3,6 +3,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 9;
 
 BEGIN { use_ok('ZOOM') };
diff --git a/t/29-events.t b/t/29-events.t
index 5c0ef4b..9bb2ba4 100644
--- a/t/29-events.t
+++ b/t/29-events.t
@@ -3,6 +3,12 @@
 
 use strict;
 use warnings;
+BEGIN {
+  $ENV{NO_NETWORK_TESTING} and do { 
+    print "1..0 # SKIP due to NO_NETWORK_TESTING=1";
+    exit;
+  };
+}
 use Test::More tests => 23;
 
 BEGIN { use_ok('ZOOM') };
-- 
2.15.1