[PATCH 2/2] Add test for the new status message
To
gitster@pobox.com
Cc
avarab@gmail.com
peff@peff.net
git@vger.kernel.org
Kaartic Sivaraam
From
Kaartic Sivaraam
See Also
Prev
Date
2017-06-19 02:41:44 UTC
Patch-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
---
 t/t7508-status.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index fb00e6d9b..e9337c728 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -1499,4 +1499,15 @@ test_expect_success 'git commit -m will commit a staged but ignored submodule' '
 	git config -f .gitmodules  --remove-section submodule.subname
 '
 
+test_expect_success 'No commits yet should be noted in status output' '
+       git init initial &&
+       cd initial &&
+       git status >output &&
+       test_i18ngrep "No commits yet" output &&
+       test_commit initial &&
+       git status >output &&
+       test_i18ngrep ! "No commits yet" output &&
+       test_i18ngrep "nothing.*to commit" output
+'
+
 test_done
-- 
2.11.0