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 8549f5d8eb6..8e0f1d371ae 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 00000000000..4644965b154 --- /dev/null +++ b/tests/ui/runtime/stdout-during-shutdown-windows.rs @@ -0,0 +1,20 @@ +//@ run-pass +//@ check-run-results +//@ only-windows + +struct Bye; + +impl Drop for Bye { + fn drop(&mut self) { + print!(", world!"); + } +} + +fn main() { + thread_local!{ + static BYE: Bye = Bye; + } + BYE.with(|_| { + print!("hello"); + }); +} diff --git a/tests/ui/runtime/stdout-during-shutdown-windows.run.stdout b/tests/ui/runtime/stdout-during-shutdown-windows.run.stdout new file mode 100644 index 00000000000..30f51a3fba5 --- /dev/null +++ b/tests/ui/runtime/stdout-during-shutdown-windows.run.stdout @@ -0,0 +1 @@ +hello, world! \ No newline at end of file