Skip to content

Commit 663c449

Browse files
committed
docs(preview): note automated coverage for #14683 manual test T33
The unit test tests/unit/preview-subdir-knitr-cwd.test.ts was added in PR #14699 alongside T33 but the manual-test README cross-reference to it never got committed before merge.
1 parent 0f40b34 commit 663c449

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎tests/docs/manual/preview/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ After every change to preview URL or handler logic, verify that single-file prev
167167
- **Steps:** From `knitr-subdir-14683/labs/` (the doc's own directory), run `quarto preview doc.qmd --to html --no-watch-inputs --no-browser --port XXXX` — the shape RStudio's Render button uses (bare filename, cwd = the doc's subdirectory).
168168
- **Expected:** Renders without `Error in rmarkdown:::abs_path(input)`; `_site/labs/doc.html` is produced showing `[1] 2` (the R chunk executed). The echoed `QUARTO_DOCUMENT_PATH` is the doc's absolute subdirectory (ends in `labs`), not `.` / the project root (#12401).
169169
- **Catches:** `fileExecutionEngineAndTarget` not normalizing the input to absolute — a cwd-relative `target.input`/`source` in the shared preview cache makes the knitr R subprocess (cwd = project dir) fail `abs_path` on the subdirectory-relative filename.
170+
- **Automated coverage:** `tests/unit/preview-subdir-knitr-cwd.test.ts` exercises this same scenario end-to-end (real R/knitr subprocess) plus a deterministic cache-key guard. Manual rerun of this test is optional — only needed to hand-verify against a real `quarto preview` CLI/browser session (e.g. after changing the preview HTTP/format-resolution layer), since the automated test calls the internal render functions directly rather than spinning up the actual preview server.
170171

171172
## Test Matrix: Format Change Detection (#14533)
172173

0 commit comments

Comments
 (0)