Improve test running

Move test running to a method on the Test class and improve output
printing logic.
This commit is contained in:
Nathan McCarty 2024-12-31 19:08:42 -05:00
parent 09ac7506ee
commit 4b2c2eb4dd
3 changed files with 40 additions and 24 deletions

View file

@ -88,9 +88,11 @@ my constant $bool-lambda =
'(\x => if x then exitSuccess else exitFailure)';
# TODO: Implemenent support for the Either case
# TODO: Use the ide protocol to drive this so we can avoid the user needing to
# import anything
# Exec the expression with the given name in the given file
# TODO: Use the ide protocol to drive this so we can avoid the user needing to import anything
#| Exec the expression with the given name in the given file
#|
#| Uses the provided $output-type to hook up an adaptor for tests returning a
#| non () value
sub idris-exec($expr, $file, $output-type? = Unit) is export {
# Have idris compile an executable for the expression,
given $output-type {