Skip to content

Commit 7a906e1

Browse files
committed
Port stdout-during-shutdown
1 parent 70147cd commit 7a906e1

4 files changed

+22
-0
lines changed

tests/ui/runtime/stdout-during-shutdown.rs renamed to tests/ui/runtime/stdout-during-shutdown-unix.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ run-pass
22
//@ check-run-results
33
//@ ignore-emscripten
4+
//@ only-unix
45

56
// Emscripten doesn't flush its own stdout buffers on exit, which would fail
67
// this test. So this test is disabled on this platform.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//@ run-pass
2+
//@ check-run-results
3+
//@ only-windows
4+
5+
struct Bye;
6+
7+
impl Drop for Bye {
8+
fn drop(&mut self) {
9+
print!(", world!");
10+
}
11+
}
12+
13+
fn main() {
14+
thread_local!{
15+
static BYE: Bye = Bye;
16+
}
17+
BYE.with(|_| {
18+
print!("hello");
19+
});
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hello, world!

0 commit comments

Comments
 (0)