xrefcheck/tests
Sergey Gulin 95d5bad3cd
[#133] Refactor golden tests
Problem: We're using a common pattern in our bats tests:
  Run xrefcheck, redirect output to a temp file
  Check the temp file matches some .gold file using `diff`
  Delete temp file
We could encapsulate this pattern and make it easier to reuse.

Solution: In the `setup` function, create a temp directory. In the
`teardown` function, delete the temp directory. Create a `to_temp`
function that runs xrefcheck with desired options, pipes its output
through the `prepare` helper function and saves it in a file inside
the temp directory. Create a `assert_diff` function that reads the temp
file, and uses `diff` to compare it against some expected output.
2022-09-24 23:47:24 +10:00
..
configs [#137] Remove checkLocalhost option 2022-09-16 03:00:53 +10:00
golden [#133] Refactor golden tests 2022-09-24 23:47:24 +10:00
markdowns [#56] Dump all the errors from different files 2022-09-23 17:13:50 +10:00
Test/Xrefcheck [#156] Make all config options optional 2022-09-24 05:51:39 +10:00
Main.hs Remove mixins 2021-11-01 15:24:25 +04:00
Spec.hs [INT-128] Make the repository REUSE compliant 2019-12-19 16:19:27 +03:00