Tests
Run ./run test to run the shared tests and then the non-deploy tests. It stops at the first failure. Each test prints its name followed by PASSED when it succeeds. Statuses are colored when the terminal supports colors.
./run deploy first runs ./run test, creates the release script, runs the shared tests again against that script, and then runs the deploy-only tests.
Test stages
The test dispatcher runs tests/shared/stage*/ and then tests/non-deploy/stage*/ in stage order. The shared tests invoke markshup and therefore run both with the checkout stub and the release script. Non-deploy tests directly test implementation code or helper scripts and run only with ./run test.
tests/deploy/stage*/ contains deploy-only tests. These invoke the release script but only run after a deployment, for example because they need network access or are too expensive for every regular test run.
Stage 1
test-cli.shverifies command-line errors and help output, title, header, footer, mandatory input and output paths, and the standalone release executable.
Stage 2
test-markdown.shverifies recursive file and directory conversion, output-name mangling, headings, hard breaks, emphasis, inline code, links, stylesheet, favicon, and JavaScript paths and links, lists, block quotes, fenced code, and title extraction.test-html.shverifies inline HTML handling, Markdown extensions, and GitHub-style admonitions.test-templates.shverifies template inheritance, asset-list markers, header and footer fallbacks, and invalid template markers.test-tables.shverifies GitHub-style pipe tables, aligned columns, and inline formatting in table cells.test-lists.shverifies nested ordered, unordered, and definition lists.
Stage 3
test-malformed-markdown.shverifies that malformed Markdown fails without creating partial output and reports a useful error.
Stage 4
test-update-site.shverifies static-site generation after the earlier test stages pass.
Shared test helpers
lib-output.shprovides shared colored test status output.lib-test.shprovides the temporary test directory, common assertions, and compact Markdown conversion assertions.