The program input and output need some testing #3
Labels
help me learn Rust!
I'm not sure how to do this, but would love to learn from you
help wanted
Extra attention is needed
The
main
function needs some refactoring (for example: #4).But refactoring requires being able to run some tests to ensure that the code behaviour hasn't changed.
I like to use dependency injection, and replacing
STDIN
,STDOUT
by variables to test the output of my command line programs (example code, test).I'm not sure how to achieve that in Rust yet, and would appreciate any suggestion!
The text was updated successfully, but these errors were encountered: