forked from 1b-agent/opencadstudio-upstream
fix(xref): follow-ups to the xref attach parity merge
- `XREF <args>` runs whole: probing the bare verb first now opens the External References palette, which refreshed every entry and toggled the palette before `XREF Reload A` / `XREF ?` ran. - Update the two tests that encoded the old behaviour: `-XREF ?` prints the reference table, and attaching a missing file is rejected. - Drop the duplicate "Specify On-screen" catalog entry that shadowed the translated common key, with its unused ftl keys. - Move `remove_pipe_symbols`' doc comment back above its function. - Note in `document_for_save` that resolved xref content stays out. - Gate the desktop-only preview cap and tab index for wasm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1988424638
commit
163763c42a
27 files changed
+27
-35
No files matched your search
@@ -1598,11 +1598,11 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn xref_dash_alias_lists_like_xref() {
|
||||
// `-XREF` is accepted as an alias for industry muscle memory; bare
|
||||
// `XREF` keeps the legacy list output for compatibility.
|
||||
// `-XREF` asks on the command line: `?` then Enter prints the
|
||||
// reference table; `XREF ?` keeps the legacy list output for scripts.
|
||||
let mut app = fresh_app();
|
||||
let out = run_capture(&mut app, "-XREF ?");
|
||||
assert!(out.contains("No external references") || out.contains("External references"));
|
||||
assert!(out.contains("Total Xref(s): 0"), "got: {out:?}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -2015,9 +2015,15 @@ mod tests {
|
||||
#[test]
|
||||
fn xref_attach_with_file_starts_placement() {
|
||||
// F10: `XREF Attach <file>` threads the file into the XATTACH
|
||||
// placement command (same flow as the picker result).
|
||||
// placement command (same flow as the picker result). A missing file
|
||||
// is rejected up front, so the reference has to exist.
|
||||
let dir = std::env::temp_dir().join(format!("ocs_xref_attach_{}", std::process::id()));
|
||||
std::fs::create_dir_all(&dir).unwrap();
|
||||
let file = dir.join("plan.dwg");
|
||||
std::fs::write(&file, b"fake").unwrap();
|
||||
let mut app = fresh_app();
|
||||
let out = run_capture(&mut app, "XREF Attach C:/refs/plan.dwg");
|
||||
let out = run_capture(&mut app, &format!("XREF Attach {}", file.to_string_lossy()));
|
||||
std::fs::remove_dir_all(&dir).ok();
|
||||
assert!(
|
||||
!out.contains("ships with reference operations"),
|
||||
"dead-end text must be gone, got: {out:?}"
|
||||
|
||||
Reference in new issue
Block a user