Skip to content

Commit

Permalink
test that the tmpdir Miri tests see is absolute and a directory
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Dec 11, 2022
1 parent 0537dfa commit 0e40664
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/pass/shims/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 0e40664

Please sign in to comment.