wduquette / molt

Embeddable TCL Interpreter for Rust applications
BSD 3-Clause "New" or "Revised" License
104 stars 12 forks source link

Set the Interp's default input and output streams #5

Open wduquette opened 5 years ago

wduquette commented 5 years ago

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.