diff --git a/tests/ui/runtime/stdout-during-shutdown.rs b/tests/ui/runtime/stdout-during-shutdown-unix.rs similarity index 97% rename from tests/ui/runtime/stdout-during-shutdown.rs rename to tests/ui/runtime/stdout-during-shutdown-unix.rs index 8549f5d8eb6d9..8e0f1d371ae59 100644 --- a/tests/ui/runtime/stdout-during-shutdown.rs +++ b/tests/ui/runtime/stdout-during-shutdown-unix.rs @@ -1,6 +1,7 @@ //@ run-pass //@ check-run-results //@ ignore-emscripten +//@ only-unix // Emscripten doesn't flush its own stdout buffers on exit, which would fail // this test. So this test is disabled on this platform. diff --git a/tests/ui/runtime/stdout-during-shutdown.run.stdout b/tests/ui/runtime/stdout-during-shutdown-unix.run.stdout similarity index 100% rename from tests/ui/runtime/stdout-during-shutdown.run.stdout rename to tests/ui/runtime/stdout-during-shutdown-unix.run.stdout diff --git a/tests/ui/runtime/stdout-during-shutdown-windows.rs b/tests/ui/runtime/stdout-during-shutdown-windows.rs new file mode 100644 index 0000000000000..dfa9651a251e2 --- /dev/null +++ b/tests/ui/runtime/stdout-during-shutdown-windows.rs @@ -0,0 +1,21 @@ +//@ run-pass +//@ check-run-results +//@ only-windows + +#![feature(thread_local)] + +#[derive(Debug)] +struct Bye; + +impl Drop for Bye { + fn drop(&mut self) { + print!(", world!"); + } +} + +#[thread_local] +static BYE: Bye = Bye; + +fn main() { + print!("{BYE:?} says hello"); +}