tests: check that stderr is empty after successful commands

Successful commands should probably not write to stderr. If we later
add commands that e.g. print warnings to stderr, we'll want to cover
that explicitly in test.
This commit is contained in:
Martin von Zweigbergk 2022-03-27 20:08:54 -07:00 committed by Martin von Zweigbergk
parent 12bce70bed
commit d68eee296e

View file

@ -66,7 +66,7 @@ impl TestEnvironment {
/// Run a `jj` command, check that it was successful, and return its stdout
pub fn jj_cmd_success(&self, current_dir: &Path, args: &[&str]) -> String {
let assert = self.jj_cmd(current_dir, args).assert().success();
let assert = self.jj_cmd(current_dir, args).assert().success().stderr("");
get_stdout_string(&assert)
}