X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=t%2Ft7502-status.sh;h=70b802ba3d4f9d985126158b1df615859986bc81;hb=aadbe44f883859536c5320e0ac1d6ed122c45671;hp=9ce50cade8981bb5317397c10b0fabeba4893fc8;hpb=f85fd3f0d1213a2b714fddc7a834817aceeca932;p=~andy%2Fgit diff --git a/t/t7502-status.sh b/t/t7502-status.sh index 9ce50cade..70b802ba3 100755 --- a/t/t7502-status.sh +++ b/t/t7502-status.sh @@ -17,6 +17,9 @@ test_expect_success 'setup' ' : > dir1/tracked && : > dir1/modified && git add . && + + git status >output && + test_tick && git commit -m initial && : > untracked && @@ -28,6 +31,12 @@ test_expect_success 'setup' ' git add dir2/added ' +test_expect_success 'status (1)' ' + + grep "use \"git rm --cached \.\.\.\" to unstage" output + +' + cat > expect << \EOF # On branch master # Changes to be committed: @@ -51,7 +60,7 @@ cat > expect << \EOF # untracked EOF -test_expect_success 'status' ' +test_expect_success 'status (2)' ' git status > output && git diff expect output @@ -119,4 +128,25 @@ test_expect_success 'status without relative paths' ' ' +cat <expect +# On branch master +# Changes to be committed: +# (use "git reset HEAD ..." to unstage) +# +# modified: dir1/modified +# +# Untracked files: +# (use "git add ..." to include in what will be committed) +# +# dir1/untracked +# dir2/ +# expect +# output +# untracked +EOF +test_expect_success 'status of partial commit excluding new file in index' ' + git status dir1/modified >output && + diff -u expect output +' + test_done