Tests with real console window #45
Replies: 3 comments
-
It occurred to me now that this new app could just record states (possibly different for different platforms) of |
Beta Was this translation helpful? Give feedback.
-
I agree it'd be nice to have some sort of integration test like this. I've definitely run into issues where the underlying System.Console seems to have unexpected behavior. Either manipulating a real terminal window (Windows-only is fine) or some sort of serialized state approach would be fine. I would personally lean towards the "real terminal" approach over the "serialized state" approach, since if the goal is to simulate weird terminal behavior we may as well go all the way and use real terminal. Whatever approach works best is fine by me, though. |
Beta Was this translation helpful? Give feedback.
-
Integration testing with real window and record/replay capabilities implemented in #230. |
Beta Was this translation helpful? Give feedback.
-
I'm inclined to add a new test project which would be a normal console application that would run a set of tests that cannot be done in standard unit tests. It's limiting because it cannot be run automatically on Github but better to have manually runnable tests than nothing.
I've for example tried to write a unit test for #30 but unsuccessfully. I think it depends on the specific implementation of
IConsole
.I'm not even sure that the behavior described in #30 is the same on all platforms (I'm Windows only 🙂).
@waf - do you agree to have such test project?
Beta Was this translation helpful? Give feedback.
All reactions