openpencil/crates/op-cli/src/cli_selection_tests.rs
Kayshen-X 9edc9f71c3 feat(cli): expand CLI command and flag surface
Add CLI path-args, file-flag, selection and design command coverage matching the expanded MCP tool surface, with tests and usage text.
2026-06-02 09:42:06 +08:00

25 lines
607 B
Rust

use super::*;
#[test]
fn parse_args_maps_selection_depth_and_file_to_ts_shape() {
let p = parse_args(&[
"selection".to_string(),
"--depth".to_string(),
"0".to_string(),
"--file".to_string(),
"screen.op".to_string(),
])
.expect("parse selection");
assert_eq!(
p.command,
Command::ToolCall {
tool: "get_selection".to_string(),
args: vec![
("readDepth".to_string(), "0".to_string()),
("filePath".to_string(), resolve_file_path_arg("screen.op")),
],
}
);
}