From: Karl Hasselström Date: Fri, 18 Jul 2008 16:58:11 +0000 (+0200) Subject: Test that we can add a new file to a non-topmost patch with refresh -p X-Git-Tag: v0.15-rc1~49^2~8 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/9979bb8433f887c394e7e5b328d387479997ffd7?hp=--cc Test that we can add a new file to a non-topmost patch with refresh -p We currently can't -- this is bug 12038, found by Jon Smirl. See https://gna.org/bugs/index.php?12038 Signed-off-by: Karl Hasselström --- 9979bb8433f887c394e7e5b328d387479997ffd7 diff --git a/t/t2701-refresh-p.sh b/t/t2701-refresh-p.sh new file mode 100755 index 0000000..d42e90f --- /dev/null +++ b/t/t2701-refresh-p.sh @@ -0,0 +1,46 @@ +#!/bin/sh + +test_description='Run "stg refresh -p"' + +. ./test-lib.sh + +# Ignore our own temp files. +cat >> .git/info/exclude < $i.txt && + git add $i.txt && + stg new p$i -m "Patch $i" && + stg refresh + done +' + +touch expected0.txt +cat > expected1.txt < expected2.txt < status1.txt && + diff -u expected0.txt status1.txt && + echo y > new.txt && + git add new.txt && + stg refresh -p p1 && + stg status > status2.txt && + diff -u expected0.txt status2.txt && + stg files p1 > files1.txt && + diff -u expected1.txt files1.txt && + stg files p2 > files2.txt && + diff -u expected2.txt files2.txt +' + +test_done