fusen icon indicating copy to clipboard operation
fusen copied to clipboard

Show how to combine with {roxytest}

Open statnmap opened this issue 3 years ago • 0 comments
trafficstars

This is common to have the same code in examples and unit tests. This implies duplicated lines of code.
{roxytest} has a way to avoid duplication by reusing example code in unit tests: https://mikldk.github.io/roxytest/articles/introduction.html. We can surely make it work with flat templates by writing the syntax directly in the example chunk.

Similarly, explore {testtex} too: https://github.com/dgkf/testex

Also, maybe we can use it as inspiration to re-use examples chunks in combination with tests chunks, for simple cases.
Should it be a specific option of the example chunk to tell to include in the tests ? Or should all examples be included in tests by default ?

statnmap avatar Aug 31 '22 21:08 statnmap