mirror of
https://tildegit.org/sbgodin/HtmGem.git
synced 2023-08-25 13:53:12 +02:00
23 lines
1.1 KiB
Plaintext
23 lines
1.1 KiB
Plaintext
# 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:
|
|
* 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
|
|
|
|
//pre-commit.git// is to be moved to //./.git/hooks/pre-commit// and //chmod x//-ed to run this test suit before committing.
|