mirror of
https://github.com/denoland/deno.git
synced 2024-11-27 16:10:57 -05:00
23 lines
771 B
Rust
23 lines
771 B
Rust
// { "preopens": { "/fixture": "fixture" } }
|
|
|
|
fn main() {
|
|
let file = std::fs::File::open("/fixture/file").unwrap();
|
|
let metadata = file.metadata().unwrap();
|
|
assert!(metadata.is_file());
|
|
assert!(metadata.len() == 5);
|
|
|
|
let file = std::fs::File::open("/fixture/symlink_to_file").unwrap();
|
|
let metadata = file.metadata().unwrap();
|
|
assert!(metadata.is_file());
|
|
assert!(metadata.len() == 5);
|
|
|
|
let file = std::fs::File::open("/fixture/directory/file").unwrap();
|
|
let metadata = file.metadata().unwrap();
|
|
assert!(metadata.is_file());
|
|
assert!(metadata.len() == 15);
|
|
|
|
let file = std::fs::File::open("/fixture/directory/symlink_to_file").unwrap();
|
|
let metadata = file.metadata().unwrap();
|
|
assert!(metadata.is_file());
|
|
assert!(metadata.len() == 15);
|
|
}
|