diff options
author | Casper Beyer <caspervonb@pm.me> | 2020-07-02 21:15:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-02 09:15:02 -0400 |
commit | cc2dda6754dee6f809480f0c794ccb67d59139a1 (patch) | |
tree | dec6f0cc90a69ddd2d015922dd2469f903903202 /std/wasi/testdata/std_fs_file_create.rs | |
parent | 851344f2ed588c0aa5db4fa66b7326900fdf9b5d (diff) |
test(std/wasi): add create directory and file tests (#6603)
Diffstat (limited to 'std/wasi/testdata/std_fs_file_create.rs')
-rw-r--r-- | std/wasi/testdata/std_fs_file_create.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/std/wasi/testdata/std_fs_file_create.rs b/std/wasi/testdata/std_fs_file_create.rs new file mode 100644 index 000000000..eec1f8350 --- /dev/null +++ b/std/wasi/testdata/std_fs_file_create.rs @@ -0,0 +1,6 @@ +// { "preopens": { "/scratch": "scratch" } } + +fn main() { + assert!(std::fs::File::create("/scratch/file").is_ok()); + assert!(std::fs::metadata("/scratch/file").unwrap().is_file()); +} |