markstory / sphinxcontrib-phpdomain

A PHP domain for sphinx. Allows you to annotate PHP objects in your sphinx docs.
Other
19 stars 15 forks source link

Add Unit Testing #59

Closed mvorisek closed 1 year ago

mvorisek commented 1 year ago

Tests should not only assert the buid passes, but also the output is exactly what we expect.

The base format of the tests input is markdown with MyST extension. This allows us to test native rst using eval-rst as well as pure AST processing - for future for #55.

When a test input is modified, the GH Actions autocommit the output changes to <current_branch>.changes branch so you can easily fix the expectaions.

markstory commented 1 year ago

The build 'passed' but with errors

Build finished. The HTML pages are in _build/html.
./search.html:20: parser error : Specification mandates value for attribute defer
  <script src="searchindex.js" defer></script>
                                    ^
-:1: parser error : Document is empty
mvorisek commented 1 year ago

The build 'passed' but with errors

Build finished. The HTML pages are in _build/html.
./search.html:20: parser error : Specification mandates value for attribute defer
  <script src="searchindex.js" defer></script>
                                    ^
-:1: parser error : Document is empty

It is a passing xmlint warning, I sent https://github.com/sphinx-doc/sphinx/pull/11494 PR to sphinx repo, for now, ignore the warning, once sphinx will release fixed version, the warning will be gone.