At present Molt writes directly to stdout, e.g., the puts command simply uses println!(). The molt-shell functions do the same. This makes it difficult to write Rust tests for them. It should instead be made possible to set the I/O streams for the Interp, and the Molt library code should use those streams. That would allow a test to redirect them.
At present Molt writes directly to stdout, e.g., the
puts
command simply usesprintln!()
. Themolt-shell
functions do the same. This makes it difficult to write Rust tests for them. It should instead be made possible to set the I/O streams for the Interp, and the Molt library code should use those streams. That would allow a test to redirect them.