Signed-off-by: David Kågedal <davidk@lysator.liu.se> --- This test case fails on the kha/experimental branch. Using "stg refresh -p <patch>" can cause all sorts of wieirdness, and there is no test case for it. t/t2700-refresh.sh | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 65 insertions(+), 0 deletions(-) create mode 100755 t/t2700-refresh.sh diff --git a/t/t2700-refresh.sh b/t/t2700-refresh.sh new file mode 100755 index 0000000..2e7901c --- /dev/null +++ b/t/t2700-refresh.sh @@ -0,0 +1,65 @@ +#!/bin/sh + +test_description='Run "stg refresh"' + +. ./test-lib.sh + +test_expect_success 'Initialize StGit stack' ' + stg init && + echo expected.txt >> .git/info/exclude && + echo patches.txt >> .git/info/exclude && + stg new p0 -m "base" && + for i in 1 2 3; do + echo base >> foo$i.txt && + git add foo$i.txt + done + stg refresh && + for i in 1 2 3; do + stg new p$i -m "foo $i" && + echo "foo $i" >> foo$i.txt && + stg refresh + done +' + +cat > expected.txt <<EOF +p0 +p3 +EOF +test_expect_success 'Refresh top patch' ' + echo bar 3 >> foo3.txt && + stg refresh && + stg status && + test -z "$(stg status)" && + stg patches foo3.txt > patches.txt && + diff -u expected.txt patches.txt +' + +cat > expected.txt <<EOF +p0 +p2 +EOF +test_expect_success 'Refresh middle patch' ' + stg status && + echo bar 2 >> foo2.txt && + stg refresh -p p2 && + stg status && + test -z "$(stg status)" && + stg patches foo2.txt > patches.txt && + diff -u expected.txt patches.txt +' + +cat > expected.txt <<EOF +p0 +p1 +EOF +test_expect_success 'Refresh bottom patch' ' + stg status && + echo bar 1 >> foo1.txt && + stg refresh -p p1 && + stg status && + test -z "$(stg status)" && + stg patches foo1.txt > patches.txt && + diff -u expected.txt patches.txt +' + +test_done -- 1.5.3.6.740.ge3d12 -- David Kågedal - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Ingo Molnar | Re: [PATCH 6/6] sched: disabled rt-bandwidth by default |
| Maciej W. Rozycki | [PATCH 2/2] acpi: Disable IRQ 0 through I/O APIC for some HP systems |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Ryan Hope | reiser4 for 2.6.27-rc1 |
git: | |
| Johannes Schindelin | Re: [PATCH] use natural ordering to display list of branches. |
| David Kastrup | Terminology question about remote branches. |
| David Kastrup | Re: If you would write git from scratch now, what would you change? |
| Johannes Schindelin | [PATCH 1/2] clone: Add an option to set up a mirror |
| Martin Toft | Mysterious transfer speed differences |
| Joachim Schipper | Re: OpenBSD/alpha Status |
| Richard Daemon | OpenBSD 4.3 running in VirtualBox? Anyone have it working properly? |
| Diana Eichert | Re: In Memoriam: Jun-ichiro Hagino |
| binto | Before & After Under The Giant Lock |
| Florent Thoumie | Re: New wpi driver |
| Peter Jeremy | Re: repeatedly opening the same .so(s) is slow? |
| Dirk Engling | Re: Strange keyboard (viral?) behaviour |
