forked from mirrors/jj
test_global_opts: make test_version just a bit nicer when it fails
This commit is contained in:
parent
42e6132771
commit
8a4b3966a6
1 changed files with 6 additions and 3 deletions
|
@ -48,10 +48,13 @@ fn test_version() {
|
|||
|
||||
let stdout = test_env.jj_cmd_success(test_env.env_root(), &["--version"]);
|
||||
let sanitized = stdout.replace(|c: char| c.is_ascii_hexdigit(), "?");
|
||||
let expected = [
|
||||
"jj ?.??.?\n",
|
||||
"jj ?.??.?-????????????????????????????????????????\n",
|
||||
];
|
||||
assert!(
|
||||
sanitized == "jj ?.??.?\n"
|
||||
|| sanitized == "jj ?.??.?-????????????????????????????????????????\n",
|
||||
"{sanitized}"
|
||||
expected.contains(&sanitized.as_str()),
|
||||
"`jj version` output: {stdout:?}.\nSanitized: {sanitized:?}\nExpected one of: {expected:?}"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue