Test the examples against recorded output #77

Open
opened 2025-03-28 08:00:36 +00:00 by Vectornaut · 0 comments
Member

Goal

During development, I often record the printed output of the examples and compare it against a previous recording to make sure it hasn't changed. It would be useful to automate this test.

Implementation ideas

The approach described in "Testing input and output in Rust command line applications" should work well for us. We'd just need to replace print! with write! in the examples, as described here.

## Goal During development, I often record the printed output of the examples and compare it against a previous recording to make sure it hasn't changed. It would be useful to automate this test. ## Implementation ideas The approach described in ["Testing input and output in Rust command line applications"](https://jeffkreeftmeijer.com/rust-stdin-stdout-testing/) should work well for us. We'd just need to replace `print!` with `write!` in the examples, as described [here](https://stackoverflow.com/a/48393114).
Vectornaut added the
enhancement
label 2025-03-28 08:01:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: StudioInfinity/dyna3#77
No description provided.