()
| 1295 | |
| 1296 | #[test] |
| 1297 | fn merge_subcommand_different_report_levels() { |
| 1298 | let repo_name = "merge_subcommand_report_levels"; |
| 1299 | let repo = setup_git_repo(repo_name); |
| 1300 | let path_to_repo = generate_path_to_repo(repo_name); |
| 1301 | |
| 1302 | println!("=== TEST SETUP: Repository Structure ==="); |
| 1303 | { |
| 1304 | // create new file |
| 1305 | create_new_file(&path_to_repo, "hello_world.txt", "Hello, world!"); |
| 1306 | |
| 1307 | // add first commit to master |
| 1308 | first_commit_all(&repo, "first commit"); |
| 1309 | println!("Created master branch with hello_world.txt"); |
| 1310 | }; |
| 1311 | |
| 1312 | let current_branch = get_current_branch_name(&repo); |
| 1313 | println!("Current branch: {}", current_branch); |
| 1314 | assert_eq!(¤t_branch, "master"); |
| 1315 | |
| 1316 | // create and checkout new branch named some_branch_1 |
| 1317 | { |
| 1318 | let branch_name = "some_branch_1"; |
| 1319 | create_branch(&repo, branch_name); |
| 1320 | checkout_branch(&repo, branch_name); |
| 1321 | println!("Created and checked out branch: {}", branch_name); |
| 1322 | }; |
| 1323 | |
| 1324 | { |
| 1325 | let current_branch = get_current_branch_name(&repo); |
| 1326 | println!("Current branch: {}", current_branch); |
| 1327 | assert_eq!(¤t_branch, "some_branch_1"); |
| 1328 | |
| 1329 | // create new file |
| 1330 | create_new_file(&path_to_repo, "file_1.txt", "contents 1"); |
| 1331 | println!("Created file_1.txt on some_branch_1"); |
| 1332 | |
| 1333 | // add commit to branch some_branch_1 |
| 1334 | commit_all(&repo, "message"); |
| 1335 | }; |
| 1336 | |
| 1337 | // create and checkout new branch named some_branch_2 |
| 1338 | { |
| 1339 | let branch_name = "some_branch_2"; |
| 1340 | create_branch(&repo, branch_name); |
| 1341 | checkout_branch(&repo, branch_name); |
| 1342 | println!("Created and checked out branch: {}", branch_name); |
| 1343 | }; |
| 1344 | |
| 1345 | { |
| 1346 | let current_branch = get_current_branch_name(&repo); |
| 1347 | println!("Current branch: {}", current_branch); |
| 1348 | assert_eq!(¤t_branch, "some_branch_2"); |
| 1349 | |
| 1350 | // create new file |
| 1351 | create_new_file(&path_to_repo, "file_2.txt", "contents 2"); |
| 1352 | println!("Created file_2.txt on some_branch_2"); |
| 1353 | |
| 1354 | // add commit to branch some_branch_2 |
nothing calls this directly
no test coverage detected