mirror of
https://github.com/openai/codex.git
synced 2026-11-20 22:40:37 +00:00
core: add a sandbox-backed fs helper
This commit is contained in:
@@ -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(),
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user