-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #3240 - Jefffrey:tempfile, r=RalfJung
Support for tempfile crate on UNIX hosts Reviving old PR: #2720 Attempted to apply the changes as suggested by #2720 (comment) To fix tempfile to work for UNIX targets only and fall back to previous behaviour of only supporting default mode for Windows targets
- Loading branch information
Showing
4 changed files
with
181 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//@ignore-target-windows: File handling is not implemented yet | ||
//@ignore-host-windows: Only supported for UNIX hosts | ||
//@compile-flags: -Zmiri-disable-isolation | ||
|
||
#[path = "../utils/mod.rs"] | ||
mod utils; | ||
|
||
/// Test that the [`tempfile`] crate is compatible with miri for UNIX hosts and targets | ||
fn main() { | ||
test_tempfile(); | ||
test_tempfile_in(); | ||
} | ||
|
||
fn test_tempfile() { | ||
tempfile::tempfile().unwrap(); | ||
} | ||
|
||
fn test_tempfile_in() { | ||
let dir_path = utils::tmp(); | ||
tempfile::tempfile_in(dir_path).unwrap(); | ||
} |