tests: set $COLUMNS when running CLI tests

As reported in #4394, at least `test_show_command::test_show_basic`
can fail when run with a narrow terminal. This patch sets
`COLUMNS=100` in the environment when running tests so the CLI uses
that value instead of using the width of the user's terminal.
This commit is contained in:
Martin von Zweigbergk 2024-09-05 08:24:01 -07:00 committed by Martin von Zweigbergk
parent 6f44ed4f51
commit ce04e61dd4

View file

@ -89,6 +89,7 @@ impl TestEnvironment {
cmd.current_dir(current_dir);
cmd.args(args);
cmd.env_clear();
cmd.env("COLUMNS", "100");
for (key, value) in &self.env_vars {
cmd.env(key, value);
}