MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / args_escape_hatch_reads_bare_path

Function args_escape_hatch_reads_bare_path

src/tool_command/tests.rs:137–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135
136#[test]
137fn args_escape_hatch_reads_bare_path() {
138 // `--args` is a whole-payload arg, so a bare file path works without the
139 // `@` sigil — matching `memory curate --llm-ops <file>`.
140 let d = def("search");
141 let dir = std::env::temp_dir().join(format!("ts-args-bare-{}", std::process::id()));
142 std::fs::create_dir_all(&dir).unwrap();
143 let path = dir.join("payload.json");
144 std::fs::write(&path, r#"{"query":"bare","limit":4}"#).unwrap();
145 let parsed = parse_invocation(&d, &["--args".to_string(), path.display().to_string()]).unwrap();
146 assert_eq!(parsed.tool_args, json!({ "query": "bare", "limit": 4 }));
147 std::fs::remove_dir_all(&dir).ok();
148}
149
150#[test]
151fn args_escape_hatch_missing_bare_file_errors() {

Callers

nothing calls this directly

Calls 3

writeFunction · 0.85
parse_invocationFunction · 0.85
defFunction · 0.70

Tested by

no test coverage detected