git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stephan Beyer <s-beyer@gmx.net>
To: git@vger.kernel.org
Cc: Stephan Beyer <s-beyer@gmx.net>
Subject: [PATCH v2 2/2] Merge t4150-am-subdir.sh and t4151-am.sh into t4150-am.sh
Date: Sun,  1 Jun 2008 00:11:43 +0200	[thread overview]
Message-ID: <1212271903-14037-2-git-send-email-s-beyer@gmx.net> (raw)
In-Reply-To: <1212271903-14037-1-git-send-email-s-beyer@gmx.net>

This patch moves the am test cases in t4150-am.sh and the
am subdirectory test cases from t/t4150-am-subdir.sh into
t/4151-am.sh.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
---
 t/t4150-am-subdir.sh           |   72 ----------------------------------------
 t/{t4151-am.sh => t4150-am.sh} |   34 +++++++++++++++++++
 2 files changed, 34 insertions(+), 72 deletions(-)
 delete mode 100755 t/t4150-am-subdir.sh
 rename t/{t4151-am.sh => t4150-am.sh} (90%)

diff --git a/t/t4150-am-subdir.sh b/t/t4150-am-subdir.sh
deleted file mode 100755
index 52069b4..0000000
--- a/t/t4150-am-subdir.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-
-test_description='git am running from a subdirectory'
-
-. ./test-lib.sh
-
-test_expect_success setup '
-	echo hello >world &&
-	git add world &&
-	test_tick &&
-	git commit -m initial &&
-	git tag initial &&
-	echo goodbye >world &&
-	git add world &&
-	test_tick &&
-	git commit -m second &&
-	git format-patch --stdout HEAD^ >patchfile &&
-	: >expect
-'
-
-test_expect_success 'am regularly from stdin' '
-	git checkout initial &&
-	git am <patchfile &&
-	git diff master >actual &&
-	test_cmp expect actual
-'
-
-test_expect_success 'am regularly from file' '
-	git checkout initial &&
-	git am patchfile &&
-	git diff master >actual &&
-	test_cmp expect actual
-'
-
-test_expect_success 'am regularly from stdin in subdirectory' '
-	rm -fr subdir &&
-	git checkout initial &&
-	(
-		mkdir -p subdir &&
-		cd subdir &&
-		git am <../patchfile
-	) &&
-	git diff master>actual &&
-	test_cmp expect actual
-'
-
-test_expect_success 'am regularly from file in subdirectory' '
-	rm -fr subdir &&
-	git checkout initial &&
-	(
-		mkdir -p subdir &&
-		cd subdir &&
-		git am ../patchfile
-	) &&
-	git diff master >actual &&
-	test_cmp expect actual
-'
-
-test_expect_success 'am regularly from file in subdirectory with full path' '
-	rm -fr subdir &&
-	git checkout initial &&
-	P=$(pwd) &&
-	(
-		mkdir -p subdir &&
-		cd subdir &&
-		git am "$P/patchfile"
-	) &&
-	git diff master >actual &&
-	test_cmp expect actual
-'
-
-test_done
diff --git a/t/t4151-am.sh b/t/t4150-am.sh
similarity index 90%
rename from t/t4151-am.sh
rename to t/t4150-am.sh
index ec1b442..722ae96 100755
--- a/t/t4151-am.sh
+++ b/t/t4150-am.sh
@@ -223,4 +223,38 @@ test_expect_success 'am fails on empty patch' '
 	! test -d .dotest
 '
 
+test_expect_success 'am works from stdin in subdirectory' '
+	rm -fr subdir &&
+	git checkout first &&
+	(
+		mkdir -p subdir &&
+		cd subdir &&
+		git am <../patch1
+	) &&
+	test -z "$(git diff second)"
+'
+
+test_expect_success 'am works from file (relative path given) in subdirectory' '
+	rm -fr subdir &&
+	git checkout first &&
+	(
+		mkdir -p subdir &&
+		cd subdir &&
+		git am ../patch1
+	) &&
+	test -z "$(git diff second)"
+'
+
+test_expect_success 'am works from file (absolute path given) in subdirectory' '
+	rm -fr subdir &&
+	git checkout first &&
+	P=$(pwd) &&
+	(
+		mkdir -p subdir &&
+		cd subdir &&
+		git am "$P/patch1"
+	) &&
+	test -z "$(git diff second)"
+'
+
 test_done
-- 
1.5.5.1

  reply	other threads:[~2008-05-31 22:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-30 14:04 [PATCH] Add test cases for git-am Stephan Beyer
2008-05-30 22:12 ` Junio C Hamano
2008-05-31  2:40   ` Stephan Beyer
2008-05-31  6:26     ` Mutt and Mail-Followup-To Teemu Likonen
2008-05-31 19:22     ` [PATCH] Add test cases for git-am Junio C Hamano
2008-05-31 22:07       ` Stephan Beyer
2008-05-31 22:11         ` [PATCH v2 1/2] " Stephan Beyer
2008-05-31 22:11           ` Stephan Beyer [this message]
2008-05-31 22:41         ` [PATCH] " Junio C Hamano
2008-06-02 17:53         ` Andreas Ericsson

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1212271903-14037-2-git-send-email-s-beyer@gmx.net \
    --to=s-beyer@gmx.net \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).