()
| 1078 | |
| 1079 | #[test] |
| 1080 | fn merge_subcommand_custom_merge_flags() { |
| 1081 | let repo_name = "merge_subcommand_custom_flags"; |
| 1082 | let repo = setup_git_repo(repo_name); |
| 1083 | let path_to_repo = generate_path_to_repo(repo_name); |
| 1084 | |
| 1085 | println!("=== TEST SETUP: Repository Structure ==="); |
| 1086 | { |
| 1087 | // create new file |
| 1088 | create_new_file(&path_to_repo, "hello_world.txt", "Hello, world!"); |
| 1089 | |
| 1090 | // add first commit to master |
| 1091 | first_commit_all(&repo, "first commit"); |
| 1092 | println!("Created master branch with hello_world.txt"); |
| 1093 | }; |
| 1094 | |
| 1095 | let current_branch = get_current_branch_name(&repo); |
| 1096 | println!("Current branch: {}", current_branch); |
| 1097 | assert_eq!(¤t_branch, "master"); |
| 1098 | |
| 1099 | // create and checkout new branch named some_branch_1 |
| 1100 | { |
| 1101 | let branch_name = "some_branch_1"; |
| 1102 | create_branch(&repo, branch_name); |
| 1103 | checkout_branch(&repo, branch_name); |
| 1104 | println!("Created and checked out branch: {}", branch_name); |
| 1105 | }; |
| 1106 | |
| 1107 | { |
| 1108 | let current_branch = get_current_branch_name(&repo); |
| 1109 | println!("Current branch: {}", current_branch); |
| 1110 | assert_eq!(¤t_branch, "some_branch_1"); |
| 1111 | |
| 1112 | // create new file |
| 1113 | create_new_file(&path_to_repo, "file_1.txt", "contents 1"); |
| 1114 | println!("Created file_1.txt on some_branch_1"); |
| 1115 | |
| 1116 | // add commit to branch some_branch_1 |
| 1117 | commit_all(&repo, "message"); |
| 1118 | }; |
| 1119 | |
| 1120 | // create and checkout new branch named some_branch_2 |
| 1121 | { |
| 1122 | let branch_name = "some_branch_2"; |
| 1123 | create_branch(&repo, branch_name); |
| 1124 | checkout_branch(&repo, branch_name); |
| 1125 | println!("Created and checked out branch: {}", branch_name); |
| 1126 | }; |
| 1127 | |
| 1128 | { |
| 1129 | let current_branch = get_current_branch_name(&repo); |
| 1130 | println!("Current branch: {}", current_branch); |
| 1131 | assert_eq!(¤t_branch, "some_branch_2"); |
| 1132 | |
| 1133 | // create new file |
| 1134 | create_new_file(&path_to_repo, "file_2.txt", "contents 2"); |
| 1135 | println!("Created file_2.txt on some_branch_2"); |
| 1136 | |
| 1137 | // add commit to branch some_branch_2 |
nothing calls this directly
no test coverage detected