From d98d5d08ffd9b2e533d1e89233cc7ada69f30b2d Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 11 Dec 2022 19:22:55 +0100 Subject: [PATCH] test that the tmpdir Miri tests see is absolute and a directory --- tests/pass/shims/fs.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/pass/shims/fs.rs b/tests/pass/shims/fs.rs index 901a2ab102..bf46c3ef20 100644 --- a/tests/pass/shims/fs.rs +++ b/tests/pass/shims/fs.rs @@ -28,6 +28,7 @@ fn main() { test_directory(); test_canonicalize(); test_from_raw_os_error(); + test_path_conversion(); } fn tmp() -> PathBuf { @@ -74,6 +75,12 @@ fn prepare_with_content(filename: &str, content: &[u8]) -> PathBuf { path } +fn test_path_conversion() { + let tmp = tmp(); + assert!(tmp.is_absolute()); + assert!(tmp.is_dir()); +} + fn test_file() { let bytes = b"Hello, World!\n"; let path = prepare("miri_test_fs_file.txt");