Skip to content

Commit 0e40664

Browse files
committed
test that the tmpdir Miri tests see is absolute and a directory
1 parent 0537dfa commit 0e40664

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/pass/shims/fs.rs

+7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use std::io::{Error, ErrorKind, IsTerminal, Read, Result, Seek, SeekFrom, Write}
1515
use std::path::{Path, PathBuf};
1616

1717
fn main() {
18+
test_path_conversion();
1819
test_file();
1920
test_file_clone();
2021
test_file_create_new();
@@ -74,6 +75,12 @@ fn prepare_with_content(filename: &str, content: &[u8]) -> PathBuf {
7475
path
7576
}
7677

78+
fn test_path_conversion() {
79+
let tmp = tmp();
80+
assert!(tmp.is_absolute());
81+
assert!(tmp.is_dir());
82+
}
83+
7784
fn test_file() {
7885
let bytes = b"Hello, World!\n";
7986
let path = prepare("miri_test_fs_file.txt");

0 commit comments

Comments
 (0)