mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-18 18:27:38 +00:00
tests: split test_describe() that doesn't depend on fake-editor
Makes it clear that test_describe_editor_env() doesn't need edit_script.
This commit is contained in:
parent
124970c81b
commit
36b7f007eb
1 changed files with 7 additions and 1 deletions
|
@ -140,9 +140,15 @@ fn test_describe() {
|
|||
std::fs::write(&edit_script, "fail").unwrap();
|
||||
let stderr = test_env.jj_cmd_failure(&repo_path, &["describe"]);
|
||||
assert!(stderr.contains("exited with an error"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_describe_editor_env() {
|
||||
let test_env = TestEnvironment::default();
|
||||
test_env.jj_cmd_ok(test_env.env_root(), &["init", "repo", "--git"]);
|
||||
let repo_path = test_env.env_root().join("repo");
|
||||
|
||||
// Fails if the editor doesn't exist
|
||||
std::fs::write(&edit_script, "").unwrap();
|
||||
let assert = test_env
|
||||
.jj_cmd(&repo_path, &["describe"])
|
||||
.env("EDITOR", "this-editor-does-not-exist")
|
||||
|
|
Loading…
Reference in a new issue