X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/eda4068ff351143504a416393514b9fc57fb7fae..f249607484ed865696bd96a2055468b98b4e319f:/t/t0002-status.sh?ds=sidebyside diff --git a/t/t0002-status.sh b/t/t0002-status.sh index ce3b688..ac92aa8 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' ' @@ -96,30 +110,86 @@ 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