From: "Karl Hasselström" <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org
Subject: [StGit PATCH] New test: "stg diff"
Date: Tue, 09 Oct 2007 06:42:37 +0200 [thread overview]
Message-ID: <20071009044149.26624.11429.stgit@yoghurt> (raw)
In-Reply-To: <20071008153450.GA12247@diana.vm.bytemark.co.uk>
A simple test to make sure that we can run "stg diff" without
arguments, just to list local changes.
Note that two subtests currently fail; these are due to plain "stg
diff" failing on a branch where "stg init" hasn't been run, which is
plainly a bug.
Signed-off-by: Karl Hasselström <kha@treskal.com>
---
On 2007-10-08 17:34:50 +0200, Karl Hasselström wrote:
> So, we don't have a single test that tries to run "stg diff". Duh.
t/t2400-diff.sh | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
create mode 100755 t/t2400-diff.sh
diff --git a/t/t2400-diff.sh b/t/t2400-diff.sh
new file mode 100755
index 0000000..6d9ed98
--- /dev/null
+++ b/t/t2400-diff.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+test_description='Run "stg diff"'
+
+. ./test-lib.sh
+
+test_expect_failure 'Diff with no StGit data' '
+ stg diff
+'
+
+test_expect_success 'Make some local changes' '
+ echo foo >> foo.txt &&
+ git add foo.txt
+'
+
+test_expect_failure 'Diff with some local changes' '
+ stg diff
+'
+
+test_expect_success 'Initialize StGit stuff' '
+ stg init &&
+ stg new foo -m foo
+'
+
+test_expect_success 'Diff with some local changes' '
+ stg diff
+'
+
+test_expect_success 'Refresh patch' '
+ stg refresh
+'
+
+test_expect_success 'Diff with no local changes' '
+ stg diff
+'
+
+test_done
next prev parent reply other threads:[~2007-10-09 4:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-08 8:55 [StGit PATCH 0/6] Survive capital punishment Karl Hasselström
2007-10-08 8:55 ` [StGit PATCH 1/6] Allow caller to customize title of error/warning message Karl Hasselström
2007-10-08 8:55 ` [StGit PATCH 2/6] Use our nice message printout wrapping system Karl Hasselström
2007-10-08 8:55 ` [StGit PATCH 3/6] Properly detect that HEAD is detached Karl Hasselström
2007-10-08 8:55 ` [StGit PATCH 4/6] Refactor crt_series creation Karl Hasselström
2007-10-08 8:55 ` [StGit PATCH 5/6] Don't have a global crt_series in stgit.commans.common Karl Hasselström
2007-10-08 8:55 ` [StGit PATCH 6/6] Let some commands work with detached HEAD Karl Hasselström
2007-10-08 15:34 ` Karl Hasselström
2007-10-09 4:42 ` Karl Hasselström [this message]
2007-10-09 5:12 ` Karl Hasselström
2007-10-08 8:58 ` [StGit PATCH 0/6] Survive capital punishment Karl Hasselström
2007-10-08 9:27 ` 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=20071009044149.26624.11429.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.