git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Walter <stevenrwalter@gmail.com>
To: Eric Wong <normalperson@yhbt.net>, Sam Vilain <sam@vilain.net>,
	git@vger.kernel.org
Cc: Steven Walter <stevenrwalter@gmail.com>
Subject: [PATCH] Add unit test for check_cherry_pick
Date: Fri,  3 Sep 2010 14:52:15 -0400	[thread overview]
Message-ID: <1283539935-14672-1-git-send-email-stevenrwalter@gmail.com> (raw)
In-Reply-To: <AANLkTikuY28wwccxekDXD1WGtaOoF3JG7ZBfm6vjapwt@mail.gmail.com>


Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
---
 t/t9155-git-svn-fetch-merge.sh |   65 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 65 insertions(+), 0 deletions(-)
 create mode 100644 t/t9155-git-svn-fetch-merge.sh

diff --git a/t/t9155-git-svn-fetch-merge.sh b/t/t9155-git-svn-fetch-merge.sh
new file mode 100644
index 0000000..1c87986
--- /dev/null
+++ b/t/t9155-git-svn-fetch-merge.sh
@@ -0,0 +1,65 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Steven Walter
+#
+
+test_description='git svn merge detection'
+
+GIT_SVN_LC_ALL=${LC_ALL:-$LANG}
+
+. ./lib-git-svn.sh
+
+say 'define NO_SVN_TESTS to skip git svn tests'
+
+case "$GIT_SVN_LC_ALL" in
+*.UTF-8)
+	test_set_prereq UTF8
+	;;
+*)
+	say "UTF-8 locale not set, some tests skipped ($GIT_SVN_LC_ALL)"
+	;;
+esac
+
+test_expect_success \
+    'initialize source svn repo' '
+        svn_cmd mkdir -m x "$svnrepo"/trunk &&
+        svn_cmd mkdir -m x "$svnrepo"/branches &&
+        svn_cmd co "$svnrepo"/trunk "$SVN_TREE" &&
+	cd "$SVN_TREE" &&
+	touch foo &&
+	svn add foo &&
+	svn commit -m "initial commit" &&
+	svn cp -m branch "$svnrepo"/trunk "$svnrepo"/branches/branch1 &&
+	touch bar &&
+	svn add bar &&
+	svn commit -m x &&
+	svn cp -m branch "$svnrepo"/trunk "$svnrepo"/branches/branch2 &&
+	svn switch "$svnrepo"/branches/branch1 &&
+	touch baz &&
+	svn add baz &&
+	svn commit -m x &&
+	svn switch "$svnrepo"/trunk &&
+	svn merge "$svnrepo"/branches/branch1 &&
+	svn commit -m "merge" &&
+	svn switch "$svnrepo"/branches/branch1 &&
+	svn commit -m x &&
+	svn switch "$svnrepo"/branches/branch2 &&
+	svn merge "$svnrepo"/branches/branch1 &&
+	svn commit -m "merge branch1" &&
+	svn switch "$svnrepo"/trunk &&
+	svn merge "$svnrepo"/branches/branch2 &&
+	svn resolved baz &&
+	svn commit -m "merge branch2" &&
+	cd .. &&
+	rm -rf "$SVN_TREE"'
+
+test_expect_success \
+    'clone svn repo' '
+        git svn init -s "$svnrepo" &&
+	git svn fetch'
+
+test_expect_success \
+    'verify merge commit' '
+        git rev-parse HEAD^2'
+
+test_done
-- 
1.7.0.5.gbc75a

       reply	other threads:[~2010-09-03 18:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTikuY28wwccxekDXD1WGtaOoF3JG7ZBfm6vjapwt@mail.gmail.com>
2010-09-03 18:52 ` Steven Walter [this message]
2010-09-03 19:12   ` [PATCH] Add unit test for check_cherry_pick Ævar Arnfjörð Bjarmason
2010-09-03 19:26     ` Steven Walter
2010-09-03 20:48       ` Eric Wong

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=1283539935-14672-1-git-send-email-stevenrwalter@gmail.com \
    --to=stevenrwalter@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    --cc=sam@vilain.net \
    /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).