rover-cli
sh
cargo install rover-cli
Print output to console:
sh
rover-cli foo.txt
Save output to file:
sh
rover-cli --output output.txt foo.txt
To see helpful information:
sh
rover-cli --help
--unbounded
command flag is included to allow to the rover to exit the plateau.isize
is used to represent co-ordinates to allow the rover to pass (0, 0).fs::read_to_string
is used for simplicity over the more performant but more complex BufReader
.RoverControlSatellite
is used for themeatic effect!To run tests for the CLI:
sh
cargo test
Unit tests that cover basic functionality and possible branches are included, however as this is a coding exercise, 100% coverage has not been aimed for.
Setup
sh
rustup component add llvm-tools-preview &&
cargo install cargo-llvm-cov
Usage
To create a coverage report:
sh
cargo llvm-cov
To debug a coverage report:
sh
cargo llvm-cov --html --output-dir coverage