File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -270,6 +270,7 @@ pub(crate) fn run_tests(
270
270
}
271
271
272
272
let mut nb_errors = 0 ;
273
+ let mut ran_edition_tests = 0 ;
273
274
let target_str = rustdoc_options. target . to_string ( ) ;
274
275
275
276
for ( edition, mut doctests) in mergeable_tests {
@@ -296,6 +297,7 @@ pub(crate) fn run_tests(
296
297
& test_args,
297
298
rustdoc_options,
298
299
) {
300
+ ran_edition_tests += 1 ;
299
301
if !success {
300
302
nb_errors += 1 ;
301
303
}
@@ -322,7 +324,9 @@ pub(crate) fn run_tests(
322
324
}
323
325
}
324
326
325
- if !standalone_tests. is_empty ( ) {
327
+ // We need to call `test_main` even if there is no doctest to run to get the output
328
+ // `running 0 tests...`.
329
+ if ran_edition_tests == 0 || !standalone_tests. is_empty ( ) {
326
330
standalone_tests. sort_by ( |a, b| a. desc . name . as_slice ( ) . cmp ( & b. desc . name . as_slice ( ) ) ) ;
327
331
test:: test_main ( & test_args, standalone_tests, None ) ;
328
332
}
You can’t perform that action at this time.
0 commit comments