X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/eda4068ff351143504a416393514b9fc57fb7fae..1056440bd7cede989a1dd414845b035995ef7a68:/t/t0002-status.sh diff --git a/t/t0002-status.sh b/t/t0002-status.sh index ce3b688..d95a83b 100755 --- a/t/t0002-status.sh +++ b/t/t0002-status.sh @@ -20,7 +20,7 @@ cat > expected.txt < output.txt && - diff -u expected.txt output.txt + test_cmp expected.txt output.txt ' cat > expected.txt < output.txt && - diff -u expected.txt output.txt + test_cmp expected.txt output.txt ' rm -f foo @@ -38,7 +38,7 @@ EOF test_expect_success 'Status with an empty directory' ' mkdir foo && stg status > output.txt && - diff -u expected.txt output.txt + test_cmp expected.txt output.txt ' cat > expected.txt < output.txt && - diff -u expected.txt output.txt + test_cmp expected.txt output.txt ' cat > expected.txt < output.txt && - diff -u expected.txt output.txt + test_cmp expected.txt output.txt +' + +cat > expected.txt < output.txt && + test_cmp expected.txt output.txt ' cat > expected.txt < output.txt && - diff -u expected.txt output.txt + test_cmp expected.txt output.txt ' cat > expected.txt <> foo/bar && stg status > output.txt && - diff -u expected.txt output.txt + test_cmp expected.txt output.txt ' cat > expected.txt < output.txt && - diff -u expected.txt output.txt + test_cmp expected.txt output.txt +' + +test_expect_success 'Add another file' ' + echo lajbans > fie && + git add fie && + stg refresh ' test_expect_success 'Make a conflicting patch' ' @@ -93,33 +107,86 @@ test_expect_success 'Make a conflicting patch' ' ' cat > expected.txt < output.txt && - diff -u expected.txt output.txt + test_cmp expected.txt output.txt +' + +cat > expected.txt < output.txt && + test_cmp expected.txt output.txt +' + +cat > expected.txt < output.txt && + test_cmp expected.txt output.txt +' + +cat > expected.txt < output.txt && + test_cmp expected.txt output.txt ' cat > expected.txt < output.txt && - diff -u expected.txt output.txt + test_cmp expected.txt output.txt ' cat > expected.txt < output.txt && - diff -u expected.txt output.txt + test_cmp expected.txt output.txt +' + +cat > expected.txt < output.txt && + test_cmp expected.txt output.txt +' + +cat > expected.txt < output.txt && + test_cmp expected.txt output.txt +' + +test_expect_success 'Status after renaming a file (with rename detection)' ' + git config stgit.diff-opts -M && + stg status > output.txt && + test_cmp expected.txt output.txt ' test_done