3 // ignore-emscripten no subprocess support
5 #![feature(internal_output_capture)]
8 use std::fmt::{Display, Formatter};
9 use std::io::set_output_capture;
10 use std::sync::{Arc, Mutex};
15 fn fmt(&self, _f: &mut Formatter<'_>) -> fmt::Result {
21 set_output_capture(Some(Arc::new(Mutex::new(Vec::new()))));
22 assert!(std::panic::catch_unwind(|| {