From: "Karl Hasselström" <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org
Subject: [StGIT PATCH 1/2] New test: make sure that popping doesn't change patch order
Date: Tue, 07 Aug 2007 04:43:51 +0200 [thread overview]
Message-ID: <20070807024351.11174.22203.stgit@yoghurt> (raw)
In-Reply-To: <20070807024147.11174.87229.stgit@yoghurt>
This is mostly useful in conjunction with the DAG appliedness patches,
since getting this right with a plain series file _ought_ to be
trivial. Nevertheless ...
Signed-off-by: Karl Hasselström <kha@treskal.com>
---
t/t1203-pop.sh | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/t/t1203-pop.sh b/t/t1203-pop.sh
new file mode 100755
index 0000000..0a311d4
--- /dev/null
+++ b/t/t1203-pop.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# Copyright (c) 2007 Karl Hasselström
+test_description='Test the pop command'
+. ./test-lib.sh
+
+test_expect_success \
+ 'Initialize the StGIT repository' \
+ 'stg init'
+
+test_expect_success \
+ 'Create ten patches' '
+ for i in 0 1 2 3 4 5 6 7 8 9; do
+ stg new p$i -m p$i;
+ done &&
+ [ "$(echo $(stg applied))" = "p0 p1 p2 p3 p4 p5 p6 p7 p8 p9" ] &&
+ [ "$(echo $(stg unapplied))" = "" ]
+'
+
+test_expect_success \
+ 'Pop half the patches' '
+ stg pop -n 5 &&
+ [ "$(echo $(stg applied))" = "p0 p1 p2 p3 p4" ] &&
+ [ "$(echo $(stg unapplied))" = "p5 p6 p7 p8 p9" ]
+'
+
+test_expect_success \
+ 'Pop the remaining patches' '
+ stg pop -a &&
+ [ "$(echo $(stg applied))" = "" ] &&
+ [ "$(echo $(stg unapplied))" = "p0 p1 p2 p3 p4 p5 p6 p7 p8 p9" ]
+'
+
+test_done
next prev parent reply other threads:[~2007-08-07 2:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-07 2:43 [StGIT PATCH 0/2] New and improved tests Karl Hasselström
2007-08-07 2:43 ` Karl Hasselström [this message]
2007-08-07 2:43 ` [StGIT PATCH 2/2] Verify patch status during the test Karl Hasselström
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070807024351.11174.22203.stgit@yoghurt \
--to=kha@treskal.com \
--cc=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).