Skip to content

Commit

Permalink
Add test to check stdout flushing during shutdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Sep 24, 2020
1 parent bab15f7 commit e9b25f5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/ui/stdout-during-shutdown.rs
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions src/test/ui/stdout-during-shutdown.run.stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello, world!

0 comments on commit e9b25f5

Please sign in to comment.