From eda4068ff351143504a416393514b9fc57fb7fae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karl=20Hasselstr=C3=B6m?= Date: Mon, 3 Sep 2007 00:07:13 +0200 Subject: [PATCH] Test "stg status" more thoroughly MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Karl Hasselström --- t/t0002-status.sh | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 112 insertions(+), 2 deletions(-) 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 -- 2.11.0