mirror of
https://github.com/openai/codex.git
synced 2026-05-02 04:11:39 +03:00
core: add a sandbox-backed fs helper
This commit is contained in:
21
codex-rs/fs-ops/src/command_tests.rs
Normal file
21
codex-rs/fs-ops/src/command_tests.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
use super::FsCommand;
|
||||
use super::READ_FILE_OPERATION_ARG2;
|
||||
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_ARG2, "/tmp/example.png"]
|
||||
.into_iter()
|
||||
.map(Into::into),
|
||||
)
|
||||
.expect("command should parse");
|
||||
|
||||
assert_eq!(
|
||||
command,
|
||||
FsCommand::ReadFile {
|
||||
path: "/tmp/example.png".into(),
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user