Skip to content

Commit f6a6d36

Browse files
committed
rustfmt
1 parent a97e943 commit f6a6d36

File tree

1 file changed

+24
-17
lines changed

1 file changed

+24
-17
lines changed

tests/merge.rs

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,7 @@ fn merge_subcommand_with_ahead_behind() {
331331
};
332332

333333
// Run git chain setup
334-
let args: Vec<&str> = vec![
335-
"setup",
336-
"chain_name",
337-
"master",
338-
"feature",
339-
];
334+
let args: Vec<&str> = vec!["setup", "chain_name", "master", "feature"];
340335
let output = run_test_bin_expect_ok(&path_to_repo, args);
341336

342337
// Verify chain setup succeeded
@@ -348,7 +343,7 @@ fn merge_subcommand_with_ahead_behind() {
348343
setup_stdout
349344
);
350345

351-
// Go back to master and make a change
346+
// Go back to master and make a change
352347
checkout_branch(&repo, "master");
353348
create_new_file(&path_to_repo, "master_update.txt", "master update");
354349
commit_all(&repo, "Update master");
@@ -366,21 +361,24 @@ fn merge_subcommand_with_ahead_behind() {
366361
"Expected to be on branch feature: {}",
367362
current_branch == "feature"
368363
);
369-
364+
370365
// Verify branch status
371366
let args: Vec<&str> = vec![];
372367
let status_output = run_test_bin_expect_ok(&path_to_repo, args);
373368
let status_stdout = String::from_utf8_lossy(&status_output.stdout);
374-
369+
375370
println!("Branch status: {}", status_stdout);
376371
println!("Contains '2 ahead': {}", status_stdout.contains("2 ahead"));
377-
println!("Contains '1 behind': {}", status_stdout.contains("1 behind"));
372+
println!(
373+
"Contains '1 behind': {}",
374+
status_stdout.contains("1 behind")
375+
);
378376
println!("======");
379-
377+
380378
// Debug breaks with captured output (uncomment for debugging)
381379
// assert!(false, "DEBUG STOP: Pre-merge state");
382380
// assert!(false, "status_stdout: {}", status_stdout);
383-
381+
384382
// Verify the "2 ahead ⦁ 1 behind" status is shown
385383
assert!(
386384
status_stdout.contains("2 ahead"),
@@ -429,13 +427,16 @@ fn merge_subcommand_with_ahead_behind() {
429427
println!("=== TEST DIAGNOSTICS: FINAL STATE ===");
430428
println!("STDOUT: {}", final_stdout);
431429
println!("Contains '3 ahead': {}", final_stdout.contains("3 ahead"));
432-
println!("Contains '1 behind': {}", !final_stdout.contains("1 behind"));
430+
println!(
431+
"Contains '1 behind': {}",
432+
!final_stdout.contains("1 behind")
433+
);
433434
println!("======");
434435

435436
// Debug breaks with captured output (uncomment for debugging)
436437
// assert!(false, "DEBUG STOP: Final state");
437438
// assert!(false, "final_stdout: {}", final_stdout);
438-
439+
439440
// Verify the branch status after merge - check we're correctly ahead (3 commits) and not behind
440441
assert!(
441442
final_stdout.contains("3 ahead"),
@@ -447,7 +448,7 @@ fn merge_subcommand_with_ahead_behind() {
447448
"Branch should not be behind after merge but got: {}",
448449
final_stdout
449450
);
450-
451+
451452
// Verify successful merge message appears in command output
452453
assert!(
453454
stdout.contains("Successful merges: 1"),
@@ -463,8 +464,14 @@ fn merge_subcommand_with_ahead_behind() {
463464
println!("Files: {}", files);
464465
println!("Has hello_world.txt: {}", files.contains("hello_world.txt"));
465466
println!("Has feature.txt: {}", files.contains("feature.txt"));
466-
println!("Has feature_update.txt: {}", files.contains("feature_update.txt"));
467-
println!("Has master_update.txt: {}", files.contains("master_update.txt"));
467+
println!(
468+
"Has feature_update.txt: {}",
469+
files.contains("feature_update.txt")
470+
);
471+
println!(
472+
"Has master_update.txt: {}",
473+
files.contains("master_update.txt")
474+
);
468475
println!("======");
469476

470477
// Check all expected files are present

0 commit comments

Comments
 (0)