💾 Archived View for gmi.sbgodin.fr › htmgem › tests captured on 2023-06-14 at 14:09:39. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

Tests

This test suite aims to check the quality of the translation of the fulltext source pages to HTML pages.

In the HtmGem root directory, just type **phpunit tests** to check.

parserTest.php

The parser takes the gemtext contained in the **.gmi** file and returns the internal format.

translateToHtmlTest.php

The translator takes the gemtext, parse it and returns an HTML representation.

translateToGemtextTest.php

This translator takes the gemtext, parse it and rebuild the gemtext. The output must be identical of the input. When there are optional spaces, they are trimmed. In such cases, the translation will return a kind of normalised gemtext — that is, without the spaces.

cli

The directory contains files to play around with the API:

//pre-commit.git// is to be moved to //./.git/hooks/pre-commit// and //chmod x//-ed to run this test suit before committing.