From 0e40664e1ed1e53ea2c02db3d9623c8ab42bb8c6 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..e5994db725 100644 --- a/tests/pass/shims/fs.rs +++ b/tests/pass/shims/fs.rs @@ -15,6 +15,7 @@ use std::io::{Error, ErrorKind, IsTerminal, Read, Result, Seek, SeekFrom, Write} use std::path::{Path, PathBuf}; fn main() { + test_path_conversion(); test_file(); test_file_clone(); test_file_create_new(); @@ -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");