From: Karl Hasselström Date: Sun, 2 Sep 2007 22:07:13 +0000 (+0200) Subject: Test "stg status" more thoroughly X-Git-Tag: v0.14~100 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/eda4068ff351143504a416393514b9fc57fb7fae?ds=sidebyside Test "stg status" more thoroughly Signed-off-by: Karl Hasselström --- diff --git a/t/t0002-status.sh b/t/t0002-status.sh index c088d56..ce3b688 100755 --- a/t/t0002-status.sh +++ b/t/t0002-status.sh @@ -8,8 +8,118 @@ test_description='Basic stg status Test that "stg status" works.' . ./test-lib.sh +stg init -test_expect_success 'Run status on empty' \ - 'stg status' +# Ignore our own output files. +cat > .git/info/exclude < expected.txt < output.txt && + diff -u expected.txt output.txt +' + +cat > expected.txt < output.txt && + diff -u expected.txt output.txt +' +rm -f foo + +cat > expected.txt < output.txt && + diff -u expected.txt output.txt +' + +cat > expected.txt < output.txt && + diff -u expected.txt output.txt +' + +cat > expected.txt < output.txt && + diff -u expected.txt output.txt +' + +cat > expected.txt < output.txt && + diff -u expected.txt output.txt +' + +cat > expected.txt <> foo/bar && + stg status > output.txt && + diff -u expected.txt output.txt +' + +cat > expected.txt < output.txt && + diff -u expected.txt output.txt +' + +test_expect_success 'Make a conflicting patch' ' + stg pop && + stg new -m "third patch" && + echo "woo" >> foo/bar && + stg refresh +' + +cat > expected.txt < output.txt && + diff -u expected.txt output.txt +' + +cat > expected.txt < output.txt && + diff -u expected.txt output.txt +' + +cat > expected.txt < output.txt && + diff -u expected.txt output.txt +' test_done