Open phorward opened 1 year ago
Playground for a possible solution: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=1bee6b3dc7140e4b1a20e50c4c44bf7f
The &mut dyn io::Write
must become part of Context or Runtime.
Relates to #86
The existing function
crate::test::testcase()
is a great way to express tests, because a test-case can be expressed as one source file having 3 sections:There are 2 to 3 sections separated by
#---
:Currently, this implementation runs
tokay
in a separate process and modifies stdin, stdout and stderr to feed input. It would be nicer to let this work likecrate::utils::run()
which runs a program on a given source, but with redirected input and output.