git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Steffen Prohaska <prohaska@zib.de>
Cc: git@vger.kernel.org, mitcht.git@gmail.com
Subject: Re: [PATCH] Add tests for filesystem challenges (case and unicode normalization)
Date: Mon, 25 Feb 2008 12:44:30 -0800	[thread overview]
Message-ID: <7voda4hikx.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1203873549507-git-send-email-prohaska@zib.de> (Steffen Prohaska's message of "Sun, 24 Feb 2008 18:19:09 +0100")

Steffen Prohaska <prohaska@zib.de> writes:

> Unfortunately, I had no time to start the real work of fixing the
> issues that are tested below.

That's fine.  We are not in a hurry.

> But at least the tests should be in
> good shape now and could be applied.

I do not think we would want to see "FIXED" on systems that
already behave sanely, so we would want a fix-up like this on
top of your patch, and it would be a good to go.

I do not have a handy way to test this, though, so can you try
it out and make sure test_case and test_unicode are set to
test_expect_failure correctly on problematic filesystems?

Thanks.

--

 t/t0050-filesystem.sh |   38 ++++++++++++++++++++++++++++++++------
 1 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index a0ab02e..b395c22 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -4,6 +4,34 @@ test_description='Various filesystem issues'
 
 . ./test-lib.sh
 
+auml=`perl -CO -e 'print pack("U",0x00E4)'`
+aumlcdiar=`perl -CO -e 'print pack("U",0x0061).pack("U",0x0308)'`
+
+test_expect_success 'see if we expect ' '
+
+	test_case=test_expect_success
+	test_unicode=test_expect_success
+	mkdir junk &&
+	echo good >junk/CamelCase &&
+	echo bad >junk/camelcase &&
+	if test "$(cat junk/CamelCase)" != good
+	then
+		test_camel=test_expect_failure
+		say "will test on a case insensitive filesystem"
+	fi &&
+	rm -fr junk &&
+	mkdir junk &&
+	>junk/"$auml" &&
+	case "$(cd junk && echo *)" in
+	"$aumlcdiar")
+		test_unicode=test_expect_failure
+		say "will test on a unicode corrupting filesystem"
+		;;
+	*)	;;
+	esac &&
+	rm -fr junk
+'
+
 test_expect_success "setup case tests" '
 
 	touch camelcase &&
@@ -18,22 +46,20 @@ test_expect_success "setup case tests" '
 
 '
 
-test_expect_failure 'rename (case change)' '
+$test_case 'rename (case change)' '
 
 	git mv camelcase CamelCase &&
 	git commit -m "rename"
 
 '
 
-test_expect_failure 'merge (case change)' '
+$test_case 'merge (case change)' '
 
 	git reset --hard initial &&
 	git merge topic
 
 '
 
-auml=`perl -CO -e 'print pack("U",0x00E4)'`
-aumlcdiar=`perl -CO -e 'print pack("U",0x0061).pack("U",0x0308)'`
 test_expect_success "setup unicode normalization tests" "
 
   test_create_repo unicode &&
@@ -50,14 +76,14 @@ test_expect_success "setup unicode normalization tests" "
 
 "
 
-test_expect_failure 'rename (silent unicode normalization)' "
+$test_unicode 'rename (silent unicode normalization)' "
 
  git mv $aumlcdiar $auml &&
  git commit -m \"rename\"
 
 "
 
-test_expect_failure 'merge (silent unicode normalization)' '
+$test_unicode 'merge (silent unicode normalization)' '
 
  git reset --hard initial &&
  git merge topic

  reply	other threads:[~2008-02-25 20:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-08  7:09 Add case-challenged file system tests Steffen Prohaska
2008-02-08  7:09 ` [PATCH] [WIP] git on MacOSX and files with decomposed utf-8 file names Steffen Prohaska
2008-02-08 18:02 ` Add case-challenged file system tests Junio C Hamano
2008-02-24 17:19   ` [PATCH] Add tests for filesystem challenges (case and unicode normalization) Steffen Prohaska
2008-02-25 20:44     ` Junio C Hamano [this message]
2008-02-25 23:34       ` Steffen Prohaska
2008-02-26  0:28         ` Junio C Hamano

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=7voda4hikx.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mitcht.git@gmail.com \
    --cc=prohaska@zib.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.
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).