aboutsummaryrefslogtreecommitdiff
path: root/tests/test-org-reveal-config-commands.el
Commit message (Collapse)AuthorAgeFilesLines
* fix(org): guard external-tool assumptions in export and publishing commandsCraig Jennings11 days1-2/+16
| | | | | | | | | | | Four export/publishing commands shelled out to external tools without checking they exist, so a missing tool surfaced as an opaque process error — or, for reveal.js, a silently broken presentation. I added a command-time guard to each that names the tool and what's needed: - zathura, in the pandoc PDF export-and-open command - the hugo binary and the platform file-manager opener, in hugo-config - the local reveal.js checkout (run scripts/setup-reveal.sh), shared by the reveal export and preview commands - pandoc, in the web-clip protocol handler The checks run only when the command runs, so startup stays quiet. Each guard has a test asserting the user-error fires when the tool is absent, and the existing happy-path tests now stub the lookups so they exercise the real path rather than tripping the new guard.
* test(org-reveal-config): cover command wrappers + preview helpersCraig Jennings2026-05-141-0/+197
Sibling tests covered the header template, title-to-filename slug, and the headers-remove pass. This file fills in the rest: - `cj/--reveal-preview-export-on-save`: exports in org-mode, skips otherwise. - `cj/--reveal-ensure-header`: inserts when absent, no-op (no prompt) when already present. - `cj/reveal-export`: errors outside org-mode, opens HTML in browser otherwise. - `cj/reveal-preview-start`: installs the buffer-local after-save-hook + exports once; errors outside org-mode. - `cj/reveal-preview-stop`: removes the hook + messages. - `cj/reveal-insert-header`: errors outside org-mode, errors when headers already present, inserts and reports otherwise. - `cj/reveal-remove-headers`: errors outside org-mode, messages the removed line count. - `cj/reveal-new`: errors when target file already exists. ox-reveal's `org-reveal-export-to-html` and `browse-url-of-file` are stubbed.