1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-04 17:18:23 -05:00
denoland-deno/std/wasi/testdata/std_fs_read.rs

17 lines
422 B
Rust

// { "preopens": { "/fixture": "fixture" } }
fn main() {
assert_eq!(std::fs::read("/fixture/file").unwrap(), b"file\n");
assert_eq!(
std::fs::read("/fixture/symlink_to_file").unwrap(),
b"file\n"
);
assert_eq!(
std::fs::read("/fixture/directory/file").unwrap(),
b"directory/file\n"
);
assert_eq!(
std::fs::read("/fixture/directory/symlink_to_file").unwrap(),
b"directory/file\n"
);
}