diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t7060-wtstatus.sh | 36 | ||||
-rwxr-xr-x | t/t7512-status-help.sh | 8 |
2 files changed, 38 insertions, 6 deletions
diff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh index e8c3690dac..f4f38a5e73 100755 --- a/t/t7060-wtstatus.sh +++ b/t/t7060-wtstatus.sh @@ -152,7 +152,7 @@ test_expect_success 'status when conflicts with add and rm advice (deleted by th ' -test_expect_success 'status when conflicts with add and rm advice (both deleted)' ' +test_expect_success 'prepare for conflicts' ' git reset --hard && git checkout -b conflict && test_commit one main.txt one && @@ -161,7 +161,11 @@ test_expect_success 'status when conflicts with add and rm advice (both deleted) git commit -m "main.txt renamed in sub_master.txt" && git checkout conflict_second && git mv main.txt sub_second.txt && - git commit -m "main.txt renamed in sub_second.txt" && + git commit -m "main.txt renamed in sub_second.txt" +' + + +test_expect_success 'status when conflicts with add and rm advice (both deleted)' ' test_must_fail git merge conflict && cat >expected <<-\EOF && # On branch conflict_second @@ -182,4 +186,32 @@ test_expect_success 'status when conflicts with add and rm advice (both deleted) ' +test_expect_success 'status when conflicts with only rm advice (both deleted)' ' + git reset --hard conflict_second && + test_must_fail git merge conflict && + git add sub_master.txt && + git add sub_second.txt && + cat >expected <<-\EOF && + # On branch conflict_second + # You have unmerged paths. + # (fix conflicts and run "git commit") + # + # Changes to be committed: + # + # new file: sub_master.txt + # + # Unmerged paths: + # (use "git rm <file>..." to mark resolution) + # + # both deleted: main.txt + # + # Untracked files not listed (use -u option to show untracked files) + EOF + git status --untracked-files=no >actual && + test_i18ncmp expected actual && + git reset --hard && + git checkout master +' + + test_done diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh index 3714e8e9c2..bdce1923d9 100755 --- a/t/t7512-status-help.sh +++ b/t/t7512-status-help.sh @@ -30,7 +30,7 @@ test_expect_success 'status when conflicts unresolved' ' # (fix conflicts and run "git commit") # # Unmerged paths: - # (use "git add/rm <file>..." as appropriate to mark resolution) + # (use "git add <file>..." to mark resolution) # # both modified: main.txt # @@ -83,7 +83,7 @@ test_expect_success 'status when rebase in progress before resolving conflicts' # # Unmerged paths: # (use "git reset HEAD <file>..." to unstage) - # (use "git add/rm <file>..." as appropriate to mark resolution) + # (use "git add <file>..." to mark resolution) # # both modified: main.txt # @@ -140,7 +140,7 @@ test_expect_success 'status during rebase -i when conflicts unresolved' ' # # Unmerged paths: # (use "git reset HEAD <file>..." to unstage) - # (use "git add/rm <file>..." as appropriate to mark resolution) + # (use "git add <file>..." to mark resolution) # # both modified: main.txt # @@ -336,7 +336,7 @@ test_expect_success 'status when cherry-picking before resolving conflicts' ' # (fix conflicts and run "git commit") # # Unmerged paths: - # (use "git add/rm <file>..." as appropriate to mark resolution) + # (use "git add <file>..." to mark resolution) # # both modified: main.txt # |