From: "Karl Hasselström" <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org, "David Kågedal" <davidk@lysator.liu.se>
Subject: [StGit PATCH 1/5] Simple test for "stg clean"
Date: Sun, 11 Nov 2007 20:43:37 +0100 [thread overview]
Message-ID: <20071111194334.18868.87832.stgit@yoghurt> (raw)
In-Reply-To: <20071111193545.18868.62490.stgit@yoghurt>
Signed-off-by: Karl Hasselström <kha@treskal.com>
---
t/t2500-clean.sh | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
create mode 100755 t/t2500-clean.sh
diff --git a/t/t2500-clean.sh b/t/t2500-clean.sh
new file mode 100755
index 0000000..3364c18
--- /dev/null
+++ b/t/t2500-clean.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+test_description='Run "stg clean"'
+
+. ./test-lib.sh
+
+test_expect_success 'Initialize StGit stack' '
+ stg init &&
+ stg new e0 -m e0 &&
+ stg new p0 -m p0 &&
+ echo foo > foo.txt &&
+ git add foo.txt &&
+ stg refresh &&
+ stg new e1 -m e1 &&
+ stg new e2 -m e2 &&
+ stg pop
+'
+
+test_expect_success 'Clean empty patches' '
+ [ "$(echo $(stg applied))" = "e0 p0 e1" ] &&
+ [ "$(echo $(stg unapplied))" = "e2" ] &&
+ stg clean &&
+ [ "$(echo $(stg applied))" = "p0" ] &&
+ [ "$(echo $(stg unapplied))" = "" ]
+'
+
+test_done
next prev parent reply other threads:[~2007-11-11 19:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-11 19:43 [StGit PATCH 0/5] A few small fixes Karl Hasselström
2007-11-11 19:43 ` Karl Hasselström [this message]
2007-11-11 19:43 ` [StGit PATCH 2/5] Cogito is deprecated, so don't point to it Karl Hasselström
2007-11-11 19:43 ` [StGit PATCH 3/5] Let some commands work with detached HEAD Karl Hasselström
2007-11-11 19:43 ` [StGit PATCH 4/5] Rename "stg assimilate" to "stg repair" Karl Hasselström
2007-11-11 19:44 ` [StGit PATCH 5/5] stg repair: Patchify non-patch commits between patches Karl Hasselström
2007-11-12 11:02 ` [StGit PATCH 0/5] A few small fixes Catalin Marinas
2007-11-12 13:01 ` 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=20071111194334.18868.87832.stgit@yoghurt \
--to=kha@treskal.com \
--cc=catalin.marinas@gmail.com \
--cc=davidk@lysator.liu.se \
--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).