jj/tests/common
Ilya Grigoriev d654a9e163 TestEnvironment: make it easier to run integration tests with printf debugging
Before this, it was difficult to run an integration test after adding any
directives from printf-style debugging to jj (e.g. `err!`, `eprintln!`,
`println!`), since `jj_cmd_success` fails if `jj` to output anything to stderr
while `jj_cmd_failure` fails if stdout is not empty.

This adds a `TestEnvironment::debug_allow_stderr` variable that lifts this
restriction for `jj_cmd_success` and makes it output anything `jj` output to
stderr instead. You can set it directly or by running the test with the
`DEBUG_ALLOW_STDERR` environment variable set. You can then add `err!`
anywhere.

You do need to run the test in a somewhat special way, as described in the
docstring.
2023-05-14 19:59:50 -07:00
..
mod.rs TestEnvironment: make it easier to run integration tests with printf debugging 2023-05-14 19:59:50 -07:00