From: Eric S. Raymond Date: Sun, 9 Nov 2014 04:23:15 +0000 (-0500) Subject: Add regression test for git status. X-Git-Tag: 0.3~21 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=4fc6aac5a5905f9f00686a6626ae523b12ac8a25;p=src.git Add regression test for git status. --- diff --git a/srctest b/srctest index dc8c219..b363ea0 100755 --- a/srctest +++ b/srctest @@ -201,6 +201,30 @@ EOF src $TESTOPTS ls | diff -u testfile16 - check "ls" +src $TESTOPTS add testfile16 +src $TESTOPTS status testfile16 | grep "^A" >/dev/null +check "A status check after registration" + +src $TESTOPTS commit -m "Another sample" testfile16 +src $TESTOPTS status testfile16 | grep "^U" >/dev/null +check "U status check after first commit" + +echo "Add a second line" >>testfile16 +src $TESTOPTS status testfile16 | grep "^M" >/dev/null +check "M status check after modification" + +rm testfile16 +src $TESTOPTS status testfile16 | grep "^!" >/dev/null +check "! status check after deletion" + +src $TESTOPTS checkout testfile16 +src $TESTOPTS status testfile16 | grep "^U" >/dev/null +check "U status check after restoration" + +rm -f $SANDBOX/testfile16,v +src $TESTOPTS status testfile16 | grep "^?" >/dev/null +check "? status check after master deletion" + rm -fr $SANDBOX # end