mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-29 11:01:13 +00:00
tests: use another workaround for intellij-rust/intellij-rust#5368
I'm about to make these strings not be regular expressions, so I need to get rid of the `[ ]` workaround.
This commit is contained in:
parent
20ff88461b
commit
b7942ad55a
@ -25,10 +25,8 @@ fn smoke_test() {
|
|||||||
let repo_path = test_env.env_root().join("repo");
|
let repo_path = test_env.env_root().join("repo");
|
||||||
// Check the output of `jj status` right after initializing repo
|
// Check the output of `jj status` right after initializing repo
|
||||||
let assert = test_env.jj_cmd(&repo_path, &["status"]).assert().success();
|
let assert = test_env.jj_cmd(&repo_path, &["status"]).assert().success();
|
||||||
let output_regex = "^Parent commit: 000000000000[ ]
|
let output_regex = "^Parent commit: 000000000000 \nWorking copy : ([[:xdigit:]]+) \nThe \
|
||||||
Working copy : ([[:xdigit:]]+)[ ]
|
working copy is clean\n$";
|
||||||
The working copy is clean
|
|
||||||
$";
|
|
||||||
let (_, matches) = capture_matches(assert, output_regex);
|
let (_, matches) = capture_matches(assert, output_regex);
|
||||||
let wc_hex_id_empty = matches[0].clone();
|
let wc_hex_id_empty = matches[0].clone();
|
||||||
|
|
||||||
@ -38,9 +36,8 @@ $";
|
|||||||
std::fs::write(repo_path.join("file3"), "file3").unwrap();
|
std::fs::write(repo_path.join("file3"), "file3").unwrap();
|
||||||
|
|
||||||
let assert = test_env.jj_cmd(&repo_path, &["status"]).assert().success();
|
let assert = test_env.jj_cmd(&repo_path, &["status"]).assert().success();
|
||||||
let output_regex = "^Parent commit: 000000000000[ ]
|
let output_regex = "^Parent commit: 000000000000 \nWorking copy : ([[:xdigit:]]+) \nWorking \
|
||||||
Working copy : ([[:xdigit:]]+)[ ]
|
copy changes:
|
||||||
Working copy changes:
|
|
||||||
A file1
|
A file1
|
||||||
A file2
|
A file2
|
||||||
A file3
|
A file3
|
||||||
@ -68,7 +65,6 @@ $";
|
|||||||
|
|
||||||
// Close the commit
|
// Close the commit
|
||||||
let assert = test_env.jj_cmd(&repo_path, &["close"]).assert().success();
|
let assert = test_env.jj_cmd(&repo_path, &["close"]).assert().success();
|
||||||
let output_regex = "^Working copy now at: [[:xdigit:]]+[ ]
|
let output_regex = "^Working copy now at: [[:xdigit:]]+ \n$";
|
||||||
$";
|
|
||||||
assert.stdout(predicates::str::is_match(output_regex).unwrap());
|
assert.stdout(predicates::str::is_match(output_regex).unwrap());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user