10 ms·
These ideas are exactly what I have been looking for. A year or so ago I started working on a prototype tool[0] using `curses` and I never found a good way to t
by css 6y ago
These ideas are exactly what I have been looking for. A year or so ago I started working on a prototype tool[0] using `curses` and I never found a good way to test things beyond behavior of internal methods.
In an effort to make it more portable I have started a re-write[1] in Rust (using `crossterm` this time). This mocking strategy seems like exactly what I need to fix this gap in the app's tests.
[0] https://github.com/ReagentX/Logria-py https://github.com/ReagentX/Logria-py
[1] https://github.com/ReagentX/Logria https://github.com/ReagentX/Logria
- jmmv 6y agoGlad to hear that you liked the post and that you'll try it in a project of yours! It'd be nice to hear about your experience later on. crossterm is a very nice library, and I suspect it'd be extended somehow to "natively" support the kind of mocking I presented in the post without having to add an intermediate abstraction layer.
- tstack 6y agoSlightly off topic... but, if you're interested in console logging tools, have you looked into https://lnav.org https://lnav.org or https://github.com/rcoh/angle-grinder/ https://github.com/rcoh/angle-grinder/ ?
- css 6y agoI looked into a lot of tools before I decided to build this and none of them fit into my workflow the way I wanted them to.