#[cfg(target_os = "linux")]
fn main() {
#[cfg(not(feature = "std-stream-captured"))]
run();
#[cfg(feature = "std-stream-captured")]
assert!(std::panic::catch_unwind(run).is_err());
fn run() {
{
let dev_full = std::ffi::CString::new("/dev/full").unwrap();
unsafe {
let fd = libc::open(dev_full.as_ptr(), libc::O_WRONLY);
libc::dup2(fd, libc::STDOUT_FILENO);
libc::dup2(fd, libc::STDERR_FILENO);
}
}
spdlog::info!("will panic if print macros are used internally");
spdlog::error!("will panic if print macros are used internally");
}
}
#[cfg(not(target_os = "linux"))]
fn main() {
}