Skip to content

Conversation

@wingo
Copy link
Collaborator

@wingo wingo commented Sep 16, 2025

No description provided.

@wingo wingo force-pushed the filesystem-rename branch 2 times, most recently from f4af324 to fa71fc7 Compare September 22, 2025 09:57
@wingo wingo changed the title wasi:[email protected]: Add tests for rename wasi:[email protected]: Add tests for rename Sep 22, 2025
@wingo wingo marked this pull request as ready for review September 22, 2025 14:03

async fn test_rename(dir: &Descriptor) {
// rename-at: async func(old-path: string, new-descriptor: borrow<descriptor>, new-path: string) -> result<_, error-code>;
let mv = |from: &str, to: &str| -> _ { dir.rename_at(from.to_string(), dir, to.to_string()) };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to create a child or sibling directory, open it, and get some coverage where the this and new-descriptor are different.

@wingo wingo force-pushed the filesystem-rename branch from 7cdab37 to 0f8b08b Compare October 7, 2025 07:36
@wingo wingo force-pushed the filesystem-rename branch from 0f8b08b to 9a3ec7c Compare October 7, 2025 12:16
panic!("mv . q.txt unexpectedly succeeded");
}
Err(err) => {
panic!("mv . q.txt: unexpected error {}", err);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fails on Windows with access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants