From c0071ae5dc1c610ab3791ece7ccf7d4772fde151 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 22 Jul 2016 20:17:31 +0000 Subject: git-svn: allow --version to work anywhere Checking the version of the installed SVN libraries should not require a git repository at all. This matches the behavior of "git --version". Add a test for "git svn help" for the same behavior while we're at it, too. Signed-off-by: Eric Wong --- t/t9100-git-svn-basic.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 't/t9100-git-svn-basic.sh') diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh index 28082b134..ab6593b91 100755 --- a/t/t9100-git-svn-basic.sh +++ b/t/t9100-git-svn-basic.sh @@ -19,6 +19,25 @@ case "$GIT_SVN_LC_ALL" in ;; esac +deepdir=nothing-above +ceiling=$PWD + +test_expect_success 'git svn --version works anywhere' ' + mkdir -p "$deepdir" && ( + export GIT_CEILING_DIRECTORIES="$ceiling" && + cd "$deepdir" && + git svn --version + ) +' + +test_expect_success 'git svn help works anywhere' ' + mkdir -p "$deepdir" && ( + export GIT_CEILING_DIRECTORIES="$ceiling" && + cd "$deepdir" && + git svn help + ) +' + test_expect_success \ 'initialize git svn' ' mkdir import && -- cgit v1.2.1 From 7b232add79b5d95a1f5dbdf72eeb8fa9a6b92a56 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Sat, 23 Jul 2016 04:26:07 +0000 Subject: t/t91*: do not say how to avoid the tests Some of the tests "say" how to stop the svn tests from running, some do not. The test suite is directed at people reading t/README where we keep all information about running the test suite (partly, with options etc.). Remove said "say" occurences. Signed-off-by: Michael J Gruber Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- t/t9100-git-svn-basic.sh | 2 -- 1 file changed, 2 deletions(-) (limited to 't/t9100-git-svn-basic.sh') diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh index 22d8367ff..4ad5087a1 100755 --- a/t/t9100-git-svn-basic.sh +++ b/t/t9100-git-svn-basic.sh @@ -8,8 +8,6 @@ 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 -- cgit v1.2.1 From 2a96d39824464c28f2f45f2f4a4d53d7c390c9eb Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 28 Jul 2016 14:20:13 -0700 Subject: t9100: portability fix Do not say "export VAR=VAL"; "VAR=VAL && export VAR" is always more portable. Signed-off-by: Junio C Hamano --- t/t9100-git-svn-basic.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 't/t9100-git-svn-basic.sh') diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh index ab6593b91..d29f60108 100755 --- a/t/t9100-git-svn-basic.sh +++ b/t/t9100-git-svn-basic.sh @@ -24,7 +24,8 @@ ceiling=$PWD test_expect_success 'git svn --version works anywhere' ' mkdir -p "$deepdir" && ( - export GIT_CEILING_DIRECTORIES="$ceiling" && + GIT_CEILING_DIRECTORIES="$ceiling" && + export GIT_CEILING_DIRECTORIES && cd "$deepdir" && git svn --version ) @@ -32,7 +33,8 @@ test_expect_success 'git svn --version works anywhere' ' test_expect_success 'git svn help works anywhere' ' mkdir -p "$deepdir" && ( - export GIT_CEILING_DIRECTORIES="$ceiling" && + GIT_CEILING_DIRECTORIES="$ceiling" && + export GIT_CEILING_DIRECTORIES && cd "$deepdir" && git svn help ) -- cgit v1.2.1