apsis-book/tests
dev 4957368aa3 Give every piece of a formula an element, and check the page for it
A formula is written as plain text and translated to MathML. Text left
bare inside a row is not drawn by the browser, so a token without an
element disappears: every multi-digit number did. `a = floor((14 - month)
/ 12)` came out as `a = floor ( ( - month ) )`, and `year + 4800` as
`year + `. The markup looked reasonable at a glance, and the numbers were
simply gone.

The classification now covers every kind of text and has no bare output.
A number of any length is `mn`; one letter of any script is an identifier,
so Greek stays a variable rather than becoming upright text; an operator,
including one written with its spacing, is `mo`; a space is an explicit
`mspace`; and anything else is `mtext` rather than nothing.

A test walks every document in both languages and compares the characters
the page would show against the characters the formula was written with.
It found three more formulas dropping a sign, and it now guards the whole
set: ninety-six formula blocks, checked on every run rather than by
looking at a page. Only letters and digits are compared, because the
other characters in a formula source are notation — `^`, `_`, `*`,
`/`, braces, and the word `sqrt`, which is drawn as a radical sign.
2026-10-02 10:42:51 +08:00
..
api.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00
docs_api.rs Take the interface translation from the apsis-rs doc comments 2026-10-02 09:47:02 +08:00
docs_content.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00
docs_document.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00
docs_markdown.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00
docs_mathml.rs Give every piece of a formula an element, and check the page for it 2026-10-02 10:42:51 +08:00
embedded.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00
formula_rendering.rs Give every piece of a formula an element, and check the page for it 2026-10-02 10:42:51 +08:00
graph.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00
http_request.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00
http_response.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00
http_server.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00
i18n.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00
json_codec.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00
service.rs web: describe the field by layer and separate it from the implementation 2026-10-01 13:57:23 +08:00
state.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00
tools_handlers.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00
tools_labels.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00
tools_out.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00
tools_registry.rs Move every test out of src, as apsis-rs does 2026-10-02 01:56:21 +08:00