git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: git@vger.kernel.org
Cc: tboegi@web.de
Subject: [PATCH 3/5] t0050: use the SYMLINKS test prereq
Date: Thu, 26 Jul 2012 15:39:55 +0200	[thread overview]
Message-ID: <8a35a99e9694af4cccda19199c7543d748d41d73.1343309173.git.git@drmicha.warpmail.net> (raw)
In-Reply-To: <5001B82B.1060201@web.de>
In-Reply-To: <cover.1343309173.git.git@drmicha.warpmail.net>


Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 t/t0050-filesystem.sh | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index df9498b..b46ae72 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -8,7 +8,6 @@ auml=$(printf '\303\244')
 aumlcdiar=$(printf '\141\314\210')
 
 unibad=
-no_symlinks=
 test_expect_success 'see what we expect' '
 
 	test_unicode=test_expect_success &&
@@ -21,13 +20,7 @@ test_expect_success 'see what we expect' '
 		;;
 	*)	;;
 	esac &&
-	rm -fr junk &&
-	{
-		ln -s x y 2> /dev/null &&
-		test -h y 2> /dev/null ||
-		no_symlinks=1 &&
-		rm -f y
-	}
+	rm -fr junk
 '
 
 if test_have_prereq CASE_INSENSITIVE_FS
@@ -40,7 +33,7 @@ fi
 
 test "$unibad" &&
 	say "will test on a unicode corrupting filesystem"
-test "$no_symlinks" &&
+test_have_prereq SYMLINKS ||
 	say "will test on a filesystem lacking symbolic links"
 
 if test_have_prereq CASE_INSENSITIVE_FS
@@ -57,18 +50,18 @@ test_expect_success "detection of case insensitive filesystem during repo init"
 '
 fi
 
-if test "$no_symlinks"
+if test_have_prereq SYMLINKS
 then
 test_expect_success "detection of filesystem w/o symlink support during repo init" '
 
-	v=$(git config --bool core.symlinks) &&
-	test "$v" = false
+	test_must_fail git config --bool core.symlinks ||
+	test "$(git config --bool core.symlinks)" = true
 '
 else
 test_expect_success "detection of filesystem w/o symlink support during repo init" '
 
-	test_must_fail git config --bool core.symlinks ||
-	test "$(git config --bool core.symlinks)" = true
+	v=$(git config --bool core.symlinks) &&
+	test "$v" = false
 '
 fi
 
-- 
1.7.12.rc0.198.gd66b616

  parent reply	other threads:[~2012-07-26 13:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-14 17:52 [PATCH] t3910: give reason for skipping the test Michael J Gruber
2012-07-14 18:19 ` Torsten Bögershausen
2012-07-26 13:39   ` [PATCH 0/5] test-lib: filesystem prerequisites Michael J Gruber
2012-07-26 13:39     ` [PATCH 1/5] test-lib: provide case insensitivity as a prerequisite Michael J Gruber
2012-07-26 13:39     ` [PATCH 2/5] t0050: use the CASE_INSENSITIVE_FS test prereq Michael J Gruber
2012-07-26 13:39     ` Michael J Gruber [this message]
2012-07-26 13:39     ` [PATCH 4/5] test-lib: provide UTF8 behaviour as a prerequisite Michael J Gruber
2012-07-26 13:39     ` [PATCH 5/5] t3910: use the SYMLINKS test prereq Michael J Gruber
2012-07-26 18:16     ` [PATCH 0/5] test-lib: filesystem prerequisites Junio C Hamano
2012-07-26 18:43       ` Jeff King
2012-07-26 20:10         ` Junio C Hamano
2012-07-27  9:31           ` Michael J Gruber
2012-07-27 17:29             ` Junio C Hamano
2012-07-30  9:56               ` Michael J Gruber
2012-07-30  9:57               ` [PATCHv2 5/5] t3910: use the UTF8_NFD_TO_NFC test prereq Michael J Gruber
2012-07-30 15:29                 ` Junio C Hamano
2012-08-04  5:37                 ` Torsten Bögershausen
2012-08-04 22:04                   ` Junio C Hamano
2012-08-06 12:44                     ` Michael J Gruber

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=8a35a99e9694af4cccda19199c7543d748d41d73.1343309173.git.git@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=tboegi@web.de \
    /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).