1
0
mirror of https://tildegit.org/sbgodin/HtmGem.git synced 2023-08-25 13:53:12 +02:00
HtmGem/tests/index.gmi

23 lines
1.1 KiB
Plaintext
Raw Normal View History

2021-03-24 10:53:12 +01:00
# Tests
2022-08-01 11:15:30 +02:00
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.
2021-03-24 10:53:12 +01:00
### 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.
2022-08-01 11:15:30 +02:00
### cli
The directory contains files to play around with the API:
2021-03-24 10:53:12 +01:00
* parse_gemtext: outputs a //print_r()// of the internal representation
* translate_to_gemtext: outputs the regenerated gemtext
* translate_to_html: outputs the html-ified gemtext
2022-08-01 11:15:30 +02:00
//pre-commit.git// is to be moved to //./.git/hooks/pre-commit// and //chmod x//-ed to run this test suit before committing.