Add test to check stdout flushing during shutdown.
This commit is contained in:
parent
bab15f773a
commit
e9b25f520b
14
src/test/ui/stdout-during-shutdown.rs
Normal file
14
src/test/ui/stdout-during-shutdown.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// run-pass
|
||||
// check-run-results
|
||||
|
||||
#![feature(rustc_private)]
|
||||
|
||||
extern crate libc;
|
||||
|
||||
fn main() {
|
||||
extern "C" fn bye() {
|
||||
print!(", world!");
|
||||
}
|
||||
unsafe { libc::atexit(bye) };
|
||||
print!("hello");
|
||||
}
|
1
src/test/ui/stdout-during-shutdown.run.stdout
Normal file
1
src/test/ui/stdout-during-shutdown.run.stdout
Normal file
@ -0,0 +1 @@
|
||||
hello, world!
|
Loading…
x
Reference in New Issue
Block a user