t7512: test "detached from" as well
[gitweb.git] / t / t7512-status-help.sh
index bf08d4e098f1bdc3adc5ec3df37b90d90b0e5c8f..bafa5e77159194baf894c47e41e4c9ac66f29622 100755 (executable)
@@ -667,7 +667,7 @@ test_expect_success 'status when cherry-picking after resolving conflicts' '
        test_i18ncmp expected actual
 '
 
-test_expect_success 'status showing detached from a tag' '
+test_expect_success 'status showing detached at and from a tag' '
        test_commit atag tagging &&
        git checkout atag &&
        cat >expected <<-\EOF
@@ -675,6 +675,14 @@ test_expect_success 'status showing detached from a tag' '
        nothing to commit (use -u to show untracked files)
        EOF
        git status --untracked-files=no >actual &&
+       test_i18ncmp expected actual &&
+
+       git reset --hard HEAD^ &&
+       cat >expected <<-\EOF
+       # HEAD detached from atag
+       nothing to commit (use -u to show untracked files)
+       EOF
+       git status --untracked-files=no >actual &&
        test_i18ncmp expected actual
 '