Skip to content

Commit

Permalink
Implement test for path_rename syscall
Browse files Browse the repository at this point in the history
  • Loading branch information
Arshia001 committed Aug 4, 2023
1 parent c424fff commit 69a9696
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/integration/cli/tests/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1268,3 +1268,12 @@ fn test_snapshot_quickjs() {
.run_wasm(include_bytes!("./wasm/qjs.wasm"));
assert_json_snapshot!(snapshot);
}

#[cfg_attr(any(target_env = "musl", target_os = "windows"), ignore)]
#[test]
fn test_snapshot_fs_rename() {
let snapshot = TestBuilder::new()
.with_name(function!())
.run_wasm(include_bytes!("./wasm/fs-rename.wasm"));
assert_json_snapshot!(snapshot);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
source: tests/integration/cli/tests/snapshot.rs
expression: snapshot
---
{
"spec": {
"name": "snapshot::test_snapshot_fs_rename",
"use_packages": [],
"include_webcs": [],
"cli_args": [],
"enable_threads": true,
"enable_network": false
},
"result": {
"Success": {
"stdout": "/test-dir/a:a\n/test-dir/b:a\n/test-dir/c:c\n/test-dir/d:c\n",
"stderr": "",
"exit_code": 0
}
}
}
Binary file added tests/integration/cli/tests/wasm/fs-rename.wasm
Binary file not shown.

0 comments on commit 69a9696

Please sign in to comment.