git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add unit test for check_cherry_pick

From
EWEric Wong <normalperson@yhbt.net>
Date
Sep 3, 2010, 20:48 UTC
Message-ID
<20100903204851.GA16831@dcvr.yhbt.net>
In-Reply-To
<AANLkTik5kcD1reuGfq4k_Oidkx00MY8E+Ucf+Ef_gCDD@mail.gmail.com>
Steven Walter <stevenrwalter@gmail.com> wrote:
Show 9 quoted lines
> On Fri, Sep 3, 2010 at 3:12 PM, Ævar Arnfjörð Bjarmason wrote:
> > On Fri, Sep 3, 2010 at 18:52, Steven Walter <stevenrwalter@gmail.com> wrote:
> >> +GIT_SVN_LC_ALL=${LC_ALL:-$LANG}
> >
> > What's this about?
> 
> I'll admit that I copied these from t9100.  I assumed they were
> necessary for correct operation.  If that's not the case, then they
> can be removed.

Hi Steven, I've squashed your test case along with the following change and pushed the original commit up to git://git.bogomips.org/git-svn

Here's the intermediate diff -w of changes I made (all space indentations were convert to tabs, too):

diff --git a/t/t9157-git-svn-fetch-merge.sh b/t/t9157-git-svn-fetch-merge.sh
index 1c87986..da582c5 100644
--- a/t/t9157-git-svn-fetch-merge.sh
+++ b/t/t9157-git-svn-fetch-merge.sh
@@ -4,27 +4,13 @@
 #
 
 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' '
+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 &&
@@ -49,17 +35,16 @@ test_expect_success \
 	svn switch "$svnrepo"/trunk &&
 	svn merge "$svnrepo"/branches/branch2 &&
 	svn resolved baz &&
-	svn commit -m "merge branch2" &&
-	cd .. &&
-	rm -rf "$SVN_TREE"'
+		svn commit -m "merge branch2"
+	) &&
+	rm -rf "$SVN_TREE"
+'
 
-test_expect_success \
-    'clone svn repo' '
+test_expect_success 'clone svn repo' '
         git svn init -s "$svnrepo" &&
-	git svn fetch'
+	git svn fetch
+'
 
-test_expect_success \
-    'verify merge commit' '
-        git rev-parse HEAD^2'
+test_expect_success 'verify merge commit' 'git rev-parse HEAD^2'
 
 test_done
-- 
Eric Wong
Previous: Steven Walter
Message 4 of 4 in “Add unit test for check_cherry_pick”
  1. Add unit test for check_cherry_pickSteven Walter, Sep 3, 2010
  2. Ævar Arnfjörð BjarmasonSep 3, 2010
  3. Steven WalterSep 3, 2010
  4. Eric WongSep 3, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.