1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-25 16:49:18 -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"
);
}