mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-22 02:56:52 +03:00
context test: JSON-quote the snapshot identity, as the verb does
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vau2X53xGTjjTCXWMVBoNY
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
5f3defb2da
commit
1d506359d7
@@ -755,7 +755,13 @@ mod tests_660 {
|
||||
// The identity exactly as the verb resolves it for this target from this
|
||||
// cwd, so the test holds on every platform's path semantics.
|
||||
let identity = resolve_target_identity("App.tsx", &cwd).unwrap();
|
||||
let body = format!("---\ntarget_identity: \"{}\"\nslug: app-tsx\n---\n# Critique\n", identity);
|
||||
// Frontmatter values are JSON scalars (`parse_frontmatter` reads them
|
||||
// with serde_json), so the identity is JSON-quoted: a Windows path's
|
||||
// backslashes must be escaped or the value fails to parse.
|
||||
let body = format!(
|
||||
"---\ntarget_identity: {}\nslug: app-tsx\n---\n# Critique\n",
|
||||
serde_json::to_string(&identity).unwrap()
|
||||
);
|
||||
std::fs::write(jsp::join(&[&dir, name]), &body).unwrap();
|
||||
|
||||
// Wrong target identity: refused (exit 2), snapshot untouched.
|
||||
|
||||
Reference in New Issue
Block a user