Re: [PATCHv2 5/5] t3910: use the UTF8_NFD_TO_NFC test prereq

2012-08-06 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 05.08.2012 00:04:
 Torsten Bögershausen tbo...@web.de writes:
 
 Am 2012-07-30 11:57, schrieb Michael J Gruber:
 (Sorry being late)

 That line:
 skip_all=filesystem does not convert utf-8 nfd to nfc

 shouldn't it be the other way around?
 skip_all=filesystem does not convert utf-8 nfc to nfd

 (and may be the following may be more easy to read:)
 skip_all=filesystem does not decompose unicode


 Side note: t0050 uses another term:
 will test on a unicode corrupting filesystem
 
 I am OK with either of the last two.  Thanks for noticing.

I had taken the test description from t3910. But that referred to Git's
undoing of the conversion done by the filesystem...

It's best to have it analogous to t0050 as in Junio's fixup.

Thanks!
Michael
[resent with cc: list...]
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv2 5/5] t3910: use the UTF8_NFD_TO_NFC test prereq

2012-08-04 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes:

 Am 2012-07-30 11:57, schrieb Michael J Gruber:
 (Sorry being late)

 That line:
skip_all=filesystem does not convert utf-8 nfd to nfc

 shouldn't it be the other way around?
 skip_all=filesystem does not convert utf-8 nfc to nfd

 (and may be the following may be more easy to read:)
 skip_all=filesystem does not decompose unicode


 Side note: t0050 uses another term:
 will test on a unicode corrupting filesystem

I am OK with either of the last two.  Thanks for noticing.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCHv2 5/5] t3910: use the UTF8_NFD_TO_NFC test prereq

2012-07-30 Thread Michael J Gruber
Besides reusing the new test prerequisite, this fixes also the issue
that the current output is not TAP compliant and produces the output no
reason given [for skipping].

Signed-off-by: Michael J Gruber g...@drmicha.warpmail.net
---
Same patch, new subject line which matches the actual patch. Yeah.

 t/t3910-mac-os-precompose.sh | 281 +--
 1 file changed, 135 insertions(+), 146 deletions(-)

diff --git a/t/t3910-mac-os-precompose.sh b/t/t3910-mac-os-precompose.sh
index 88b7a20..9244b69 100755
--- a/t/t3910-mac-os-precompose.sh
+++ b/t/t3910-mac-os-precompose.sh
@@ -7,158 +7,147 @@ test_description='utf-8 decomposed (nfd) converted to 
precomposed (nfc)'
 
 . ./test-lib.sh
 
+if ! test_have_prereq UTF8_NFD_TO_NFC
+then
+   skip_all=filesystem does not convert utf-8 nfd to nfc
+   test_done
+fi
+
+# create utf-8 variables
 Adiarnfc=`printf '\303\204'`
 Adiarnfd=`printf 'A\314\210'`
 
-# check if the feature is compiled in
-mkdir junk 
-junk/$Adiarnfc 
-case $(cd junk  echo *) in
-   $Adiarnfd)
-   test_nfd=1
-   ;;
-   *)  ;;
-esac
-rm -rf junk
+Odiarnfc=`printf '\303\226'`
+Odiarnfd=`printf 'O\314\210'`
+AEligatu=`printf '\303\206'`
+Invalidu=`printf '\303\377'`
 
 
-if test $test_nfd
-then
-   # create more utf-8 variables
-   Odiarnfc=`printf '\303\226'`
-   Odiarnfd=`printf 'O\314\210'`
-   AEligatu=`printf '\303\206'`
-   Invalidu=`printf '\303\377'`
+#Create a string with 255 bytes (decomposed)
+Alongd=$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd #21 Byte
+Alongd=$Alongd$Alongd$Alongd   #63 Byte
+Alongd=$Alongd$Alongd$Alongd$Alongd$Adiarnfd   #255 
Byte
 
+#Create a string with 254 bytes (precomposed)
+Alongc=$AEligatu$AEligatu$AEligatu$AEligatu$AEligatu #10 Byte
+Alongc=$Alongc$Alongc$Alongc$Alongc$Alongc   #50 Byte
+Alongc=$Alongc$Alongc$Alongc$Alongc$Alongc   #250 Byte
+Alongc=$Alongc$AEligatu$AEligatu #254 Byte
 
-   #Create a string with 255 bytes (decomposed)
-   Alongd=$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd 
#21 Byte
-   Alongd=$Alongd$Alongd$Alongd   
#63 Byte
-   Alongd=$Alongd$Alongd$Alongd$Alongd$Adiarnfd   
#255 Byte
-
-   #Create a string with 254 bytes (precomposed)
-   Alongc=$AEligatu$AEligatu$AEligatu$AEligatu$AEligatu #10 Byte
-   Alongc=$Alongc$Alongc$Alongc$Alongc$Alongc   #50 Byte
-   Alongc=$Alongc$Alongc$Alongc$Alongc$Alongc   #250 Byte
-   Alongc=$Alongc$AEligatu$AEligatu #254 Byte
-
-   test_expect_success detect if nfd needed '
-   precomposeunicode=`git config core.precomposeunicode` 
-   test $precomposeunicode = false 
-   git config core.precomposeunicode true
-   '
-   test_expect_success setup '
-   x 
-   git add x 
-   git commit -m 1st commit 
-   git rm x 
-   git commit -m rm x
-   '
-   test_expect_success setup case mac '
-   git checkout -b mac_os
-   '
-   # This will test nfd2nfc in readdir()
-   test_expect_success add file Adiarnfc '
-   echo f.Adiarnfc f.$Adiarnfc 
-   git add f.$Adiarnfc 
-   git commit -m add f.$Adiarnfc
-   '
-   # This will test nfd2nfc in git stage()
-   test_expect_success stage file d.Adiarnfd/f.Adiarnfd '
-   mkdir d.$Adiarnfd 
-   echo d.$Adiarnfd/f.$Adiarnfd d.$Adiarnfd/f.$Adiarnfd 
-   git stage d.$Adiarnfd/f.$Adiarnfd 
-   git commit -m add d.$Adiarnfd/f.$Adiarnfd
-   '
-   test_expect_success add link Adiarnfc '
-   ln -s d.$Adiarnfd/f.$Adiarnfd l.$Adiarnfc 
-   git add l.$Adiarnfc 
-   git commit -m add l.Adiarnfc
-   '
-   # This will test git log
-   test_expect_success git log f.Adiar '
-   git log f.$Adiarnfc  f.Adiarnfc.log 
-   git log f.$Adiarnfd  f.Adiarnfd.log 
-   test -s f.Adiarnfc.log 
-   test -s f.Adiarnfd.log 
-   test_cmp f.Adiarnfc.log f.Adiarnfd.log 
-   rm f.Adiarnfc.log f.Adiarnfd.log
-   '
-   # This will test git ls-files
-   test_expect_success git lsfiles f.Adiar '
-   git ls-files f.$Adiarnfc  f.Adiarnfc.log 
-   git ls-files f.$Adiarnfd  f.Adiarnfd.log 
-   test -s f.Adiarnfc.log 
-   test -s f.Adiarnfd.log 
-   test_cmp f.Adiarnfc.log f.Adiarnfd.log 
-   rm f.Adiarnfc.log f.Adiarnfd.log
-   '
-   # This will test git mv
-   test_expect_success git mv '
-   git mv f.$Adiarnfd f.$Odiarnfc 
-   git mv d.$Adiarnfd d.$Odiarnfc 
-   git mv l.$Adiarnfd 

Re: [PATCHv2 5/5] t3910: use the UTF8_NFD_TO_NFC test prereq

2012-07-30 Thread Junio C Hamano
Michael J Gruber g...@drmicha.warpmail.net writes:

 Besides reusing the new test prerequisite, this fixes also the issue
 that the current output is not TAP compliant and produces the output no
 reason given [for skipping].

 Signed-off-by: Michael J Gruber g...@drmicha.warpmail.net
 ---
 Same patch, new subject line which matches the actual patch. Yeah.

Thanks; queued.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html