Skip to content

Commit

Permalink
test_git_colocated: minor changes to test_git_colocated_squash_undo
Browse files Browse the repository at this point in the history
This will make it more similar to the test introduced in the next commit.
  • Loading branch information
ilyagr committed Apr 6, 2023
1 parent d27eef7 commit c96e739
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions tests/test_git_colocated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,23 +273,25 @@ fn test_git_colocated_squash_undo() {
git2::Repository::init(&repo_path).unwrap();
test_env.jj_cmd_success(&repo_path, &["init", "--git-repo=."]);
test_env.jj_cmd_success(&repo_path, &["ci", "-m=A"]);
test_env.jj_cmd_success(&repo_path, &["describe", "-m=B"]);
test_env.jj_cmd_success(&repo_path, &["branch", "set", "master"]);
// Test the setup
insta::assert_snapshot!(get_log_output_divergence(&test_env, &repo_path), @r###"
@ rlvkpnrzqnoo 8f71e3b6a3be
◉ qpvuntsmwlqt a86754f975f9 A master
@ rlvkpnrzqnoo 2a3078eda7fe B master
◉ qpvuntsmwlqt a86754f975f9 A
◉ zzzzzzzzzzzz 000000000000
"###);

test_env.jj_cmd_success(&repo_path, &["squash"]);
test_env.jj_cmd_success(&repo_path, &["squash", "-m=A+B"]);
insta::assert_snapshot!(get_log_output_divergence(&test_env, &repo_path), @r###"
@ zsuskulnrvyr f0c12b0396d9
◉ qpvuntsmwlqt 2f376ea1478c A master
@ royxmykxtrkr 83c0d8df2b78
◉ qpvuntsmwlqt 1873a0811bf5 A+B master
◉ zzzzzzzzzzzz 000000000000
"###);
test_env.jj_cmd_success(&repo_path, &["undo"]);
insta::assert_snapshot!(get_log_output_divergence(&test_env, &repo_path), @r###"
@ rlvkpnrzqnoo 8f71e3b6a3be
◉ qpvuntsmwlqt a86754f975f9 A master
@ rlvkpnrzqnoo 2a3078eda7fe B master
◉ qpvuntsmwlqt a86754f975f9 A
◉ zzzzzzzzzzzz 000000000000
"###);
}
Expand Down

0 comments on commit c96e739

Please sign in to comment.