about summary refs log tree commit diff
path: root/src/tools/miri/tests/pass-dep/tempfile.rs
blob: a44a7e7d9244d130ce6cb981c9405faeb42228cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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();
}