]> thyrsus.com Git - src.git/commitdiff
Add regression test for git status.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 9 Nov 2014 04:23:15 +0000 (23:23 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 9 Nov 2014 04:23:15 +0000 (23:23 -0500)
srctest

diff --git a/srctest b/srctest
index dc8c2197fec645b21121acf3862804a1cda0efe4..b363ea0d794ee1a3124865fc70d1946ff4018faf 100755 (executable)
--- 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