Skip to content

Commit

Permalink
tests: set $COLUMNS when running CLI tests
Browse files Browse the repository at this point in the history
As reported in jj-vcs#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.
  • Loading branch information
martinvonz committed Sep 5, 2024
1 parent 6f44ed4 commit ce04e61
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cli/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit ce04e61

Please sign in to comment.