X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/blobdiff_plain/dcbb2c6afa8be9112eefb7793e75dc19e1ad6992..c3a72ae18c57389495e88a3a97217c3138694232:/t/t2700-refresh.sh?ds=inline diff --git a/t/t2700-refresh.sh b/t/t2700-refresh.sh index 2e7901c..9eae85d 100755 --- a/t/t2700-refresh.sh +++ b/t/t2700-refresh.sh @@ -6,8 +6,10 @@ test_description='Run "stg refresh"' test_expect_success 'Initialize StGit stack' ' stg init && - echo expected.txt >> .git/info/exclude && + echo expected*.txt >> .git/info/exclude && echo patches.txt >> .git/info/exclude && + echo show.txt >> .git/info/exclude && + echo diff.txt >> .git/info/exclude && stg new p0 -m "base" && for i in 1 2 3; do echo base >> foo$i.txt && @@ -62,4 +64,57 @@ test_expect_success 'Refresh bottom patch' ' diff -u expected.txt patches.txt ' +cat > expected.txt < expected2.txt < expected3.txt <> foo1.txt && + git add foo1.txt && + echo blah 1 >> foo1.txt && + echo baz 2 >> foo2.txt && + stg refresh --index && + stg patches foo1.txt > patches.txt && + git diff HEAD^..HEAD > show.txt && + stg diff > diff.txt && + diff -u expected.txt patches.txt && + diff -u expected2.txt show.txt && + diff -u expected3.txt diff.txt && + stg new p5 -m "cleanup again" && + stg refresh +' test_done