@@ -186,6 +186,7 @@ def erase(e = true)
186
186
def exec_test ( pathes )
187
187
@count = 0
188
188
@error = 0
189
+ @tagged = 0
189
190
@errbuf = [ ]
190
191
@location = nil
191
192
@columns = 0
@@ -198,14 +199,15 @@ def exec_test(pathes)
198
199
$stderr. puts if @verbose
199
200
count = @count
200
201
error = @error
202
+ tagged = @tagged
201
203
load File . expand_path ( path )
202
204
if @tty
203
205
if @error == error
204
- msg = "PASS #{ @count -count } "
206
+ msg = "PASS #{ ( @count -count ) - ( @tagged - tagged ) } ( #{ @tagged - tagged } tagged) "
205
207
@columns += msg . size - 1
206
208
$stderr. print "#{ @progress_bs } #{ @passed } #{ msg } #{ @reset } "
207
209
else
208
- msg = "FAIL #{ @error -error } /#{ @count -count } "
210
+ msg = "FAIL #{ @error -error } /#{ ( @count -count ) - ( @tagged - tagged ) } ( #{ @tagged - tagged } tagged) "
209
211
$stderr. print "#{ @progress_bs } #{ @failed } #{ msg } #{ @reset } "
210
212
@columns = 0
211
213
end
@@ -217,14 +219,14 @@ def exec_test(pathes)
217
219
if @count == 0
218
220
$stderr. puts "No tests, no problem"
219
221
else
220
- $stderr. puts "#{ @passed } PASS#{ @reset } all #{ @count } tests"
222
+ $stderr. puts "#{ @passed } PASS#{ @reset } all #{ @count - @tagged } tests ( #{ @tagged } tagged) "
221
223
end
222
224
exit true
223
225
else
224
226
@errbuf . each do |msg |
225
227
$stderr. puts msg
226
228
end
227
- $stderr. puts "#{ @failed } FAIL#{ @reset } #{ @error } /#{ @count } tests failed"
229
+ $stderr. puts "#{ @failed } FAIL#{ @reset } #{ @error } /#{ @count - @tagged } tests failed ( #{ @tagged } tagged) "
228
230
exit false
229
231
end
230
232
end
@@ -269,6 +271,11 @@ def show_progress(message = '')
269
271
end
270
272
271
273
def assert_check ( testsrc , message = '' , opt = '' , **argh )
274
+ if argh [ :tagged ]
275
+ argh . delete :tagged
276
+ @tagged += 1
277
+ return
278
+ end
272
279
show_progress ( message ) {
273
280
result = get_result_string ( testsrc , opt , **argh )
274
281
check_coredump
@@ -288,9 +295,9 @@ def assert_equal(expected, testsrc, message = '', opt = '', **argh)
288
295
}
289
296
end
290
297
291
- def assert_match ( expected_pattern , testsrc , message = '' )
298
+ def assert_match ( expected_pattern , testsrc , message = '' , ** argh )
292
299
newtest
293
- assert_check ( testsrc , message ) { |result |
300
+ assert_check ( testsrc , message , ** argh ) { |result |
294
301
if expected_pattern =~ result
295
302
nil
296
303
else
@@ -300,9 +307,9 @@ def assert_match(expected_pattern, testsrc, message = '')
300
307
}
301
308
end
302
309
303
- def assert_not_match ( unexpected_pattern , testsrc , message = '' )
310
+ def assert_not_match ( unexpected_pattern , testsrc , message = '' , ** argh )
304
311
newtest
305
- assert_check ( testsrc , message ) { |result |
312
+ assert_check ( testsrc , message , ** argh ) { |result |
306
313
if unexpected_pattern !~ result
307
314
nil
308
315
else
@@ -321,6 +328,11 @@ def assert_valid_syntax(testsrc, message = '')
321
328
322
329
def assert_normal_exit ( testsrc , *rest , timeout : nil , **opt )
323
330
newtest
331
+ if opt [ :tagged ]
332
+ opt . delete :tagged
333
+ @tagged += 1
334
+ return
335
+ end
324
336
message , ignore_signals = rest
325
337
message ||= ''
326
338
show_progress ( message ) {
@@ -371,9 +383,14 @@ def assert_normal_exit(testsrc, *rest, timeout: nil, **opt)
371
383
}
372
384
end
373
385
374
- def assert_finish ( timeout_seconds , testsrc , message = '' )
386
+ def assert_finish ( timeout_seconds , testsrc , message = '' , ** argh )
375
387
timeout_seconds *= 3 if defined? ( RubyVM ::MJIT ) && RubyVM ::MJIT . enabled? # for --jit-wait
376
388
newtest
389
+ if argh [ :tagged ]
390
+ argh . delete :tagged
391
+ @tagged += 1
392
+ return
393
+ end
377
394
show_progress ( message ) {
378
395
faildesc = nil
379
396
filename = make_srcfile ( testsrc )
0 commit comments