core: add a sandbox-backed fs helper

This commit is contained in:
Michael Bolin
2026-03-19 20:17:38 -07:00
parent a3e59e9e85
commit 923f673599
17 changed files with 499 additions and 37 deletions
+21
View File
@@ -0,0 +1,21 @@
use super::FsCommand;
use super::READ_FILE_OPERATION_ARG;
use super::parse_command_from_args;
use pretty_assertions::assert_eq;
#[test]
fn parse_read_command() {
let command = parse_command_from_args(
[READ_FILE_OPERATION_ARG, "/tmp/example.png"]
.into_iter()
.map(Into::into),
)
.expect("command should parse");
assert_eq!(
command,
FsCommand::ReadFile {
path: "/tmp/example.png".into(),
}
);
}