{"thread":{"id":"31026","subject":"[PATCH] t3910: give reason for skipping the test","startedAt":"2012-07-14T17:52:25Z","lastAt":"2012-08-06T12:44:26Z","messageCount":19,"participants":["Michael J Gruber","Torsten Bögershausen","Junio C Hamano","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"195050","messageId":"71c43b6e469c916f6c41026ad6ed25c1094018be.1342287902.git.git@drmicha.warpmail.net","threadId":"31026","inReplyTo":null,"subject":"[PATCH] t3910: give reason for skipping the test","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-07-14T17:52:25Z","receivedAt":"2012-07-14T17:52:25Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"t3910 is skipped for most users because it requires a filesystem which\ndoes automatic conversion between different utf-8 types. Currently, this\nresults in a skipped test with \"no reason given\".\n\nUse the skip_all mechanism from our test suite so that a reason for\nskipping the test is given to the user.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\nAlternatively, we could set a prerequisite and mark all tests with that.  Since\nit's either or for the whole test skip_all seems more appropriate.  In that\ncase, we can also flatten the else branch, of course. The current patch is\nminimally invasive, though.\n\n t/t3910-mac-os-precompose.sh | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t3910-mac-os-precompose.sh b/t/t3910-mac-os-precompose.sh\nindex 88b7a20..fb7c7ff 100755\n--- a/t/t3910-mac-os-precompose.sh\n+++ b/t/t3910-mac-os-precompose.sh\n@@ -22,8 +22,11 @@ esac\n rm -rf junk\n \n \n-if test \"$test_nfd\"\n+if ! test \"$test_nfd\"\n then\n+\tskip_all=\"filesystem does not convert utf-8 nfd to nfc\"\n+\ttest_done\n+else\n \t# create more utf-8 variables\n \tOdiarnfc=`printf '\\303\\226'`\n \tOdiarnfd=`printf 'O\\314\\210'`\n@@ -157,8 +160,6 @@ then\n \t\tprecomposeunicode=`git config core.precomposeunicode` &&\n \t\ttest \"$precomposeunicode\" = \"true\"\n \t'\n-else\n-\t say \"Skipping nfc/nfd tests\"\n fi\n \n test_done\n-- \n1.7.11.2.381.gb6e9843\n"},{"id":"195051","messageId":"5001B82B.1060201@web.de","threadId":"31026","inReplyTo":"71c43b6e469c916f6c41026ad6ed25c1094018be.1342287902.git.git@drmicha.warpmail.net","subject":"Re: [PATCH] t3910: give reason for skipping the test","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2012-07-14T18:19:23Z","receivedAt":"2012-07-14T18:19:23Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 14.07.12 19:52, Michael J Gruber wrote:\n> t3910 is skipped for most users because it requires a filesystem which\n> does automatic conversion between different utf-8 types. Currently, this\n> results in a skipped test with \"no reason given\".\n> \n> Use the skip_all mechanism from our test suite so that a reason for\n> skipping the test is given to the user.\n> \n> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n> ---\n> Alternatively, we could set a prerequisite and mark all tests with that.  Since\n> it's either or for the whole test skip_all seems more appropriate.  In that\n> case, we can also flatten the else branch, of course. The current patch is\n> minimally invasive, though.\n\nGood point, thanks.\n\nIf we spin that idea further,\nwe could move the whole t3910 into t0050.\n\nThat would be nice for all non Mac OS X users in a way that we save CPU time. \nWe already detect unicode corruption in t0050. \n"},{"id":"195853","messageId":"cover.1343309173.git.git@drmicha.warpmail.net","threadId":"31026","inReplyTo":"5001B82B.1060201@web.de","subject":"[PATCH 0/5] test-lib: filesystem prerequisites","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-07-26T13:39:52Z","receivedAt":"2012-07-26T13:39:52Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"This mini series provides and makes use of test prerequisites for\ncase insensitivity, symlinks and unicode conversion.\n\nSYMLINKS existed before but was not used in t0050.\nCASE_INSENSITIVE_FS was defined in t0003 rather than test-lib (and redone in\nt0050).\nUTF8_NFD_TO_NFC did not exist but was redone in two ways in two tests.\n\nAfter this series, all 3 are defined in test-lib and used in the various tests.\n\nMichael J Gruber (5):\n  test-lib: provide case insensitivity as a prerequisite\n  t0050: use the CASE_INSENSITIVE_FS test prereq\n  t0050: use the SYMLINKS test prereq\n  test-lib: provide UTF8 behaviour as a prerequisite\n  t3910: use the SYMLINKS test prereq\n\n t/README                     |   9 ++\n t/t0003-attributes.sh        |  10 --\n t/t0050-filesystem.sh        |  64 ++++------\n t/t3910-mac-os-precompose.sh | 281 +++++++++++++++++++++----------------------\n t/test-lib.sh                |  24 ++++\n 5 files changed, 189 insertions(+), 199 deletions(-)\n\nReally (-w), it is this besides the tab removals:\n\n t/README                     |  9 +++++++++\n t/t0003-attributes.sh        | 10 ----------\n t/t0050-filesystem.sh        | 62 ++++++++++++++++++++------------------------------------------\n t/t3910-mac-os-precompose.sh | 25 +++++++------------------\n t/test-lib.sh                | 24 ++++++++++++++++++++++++\n 5 files changed, 60 insertions(+), 70 deletions(-)\n\n-- \n1.7.12.rc0.198.gd66b616\n"},{"id":"195855","messageId":"c4385d6e48c19db3ac1fe6be50a9926111b6da1b.1343309173.git.git@drmicha.warpmail.net","threadId":"31026","inReplyTo":"5001B82B.1060201@web.de","subject":"[PATCH 1/5] test-lib: provide case insensitivity as a prerequisite","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-07-26T13:39:53Z","receivedAt":"2012-07-26T13:39:53Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Case insensitivity plays a role in several tests and is tested in several\ntests. Therefore, move the test from t003 into the test lib and use the\nprerequisite in t0003.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n t/README              |  4 ++++\n t/t0003-attributes.sh | 10 ----------\n t/test-lib.sh         | 10 ++++++++++\n 3 files changed, 14 insertions(+), 10 deletions(-)\n\ndiff --git a/t/README b/t/README\nindex 4c3ea25..5725607 100644\n--- a/t/README\n+++ b/t/README\n@@ -625,6 +625,10 @@ use these, and \"test_set_prereq\" for how to define your own.\n    Git was compiled with USE_LIBPCRE=YesPlease. Wrap any tests\n    that use git-grep --perl-regexp or git-grep -P in these.\n \n+ - CASE_INSENSITIVE_FS\n+\n+   Test is run on a case insensitive file system.\n+\n Tips for Writing Tests\n ----------------------\n \ndiff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh\nindex 51f3045..febc45c 100755\n--- a/t/t0003-attributes.sh\n+++ b/t/t0003-attributes.sh\n@@ -123,16 +123,6 @@ test_expect_success 'attribute matching is case insensitive when core.ignorecase\n \n '\n \n-test_expect_success 'check whether FS is case-insensitive' '\n-\tmkdir junk &&\n-\techo good >junk/CamelCase &&\n-\techo bad >junk/camelcase &&\n-\tif test \"$(cat junk/CamelCase)\" != good\n-\tthen\n-\t\ttest_set_prereq CASE_INSENSITIVE_FS\n-\tfi\n-'\n-\n test_expect_success CASE_INSENSITIVE_FS 'additional case insensitivity tests' '\n \ttest_must_fail attr_check a/B/D/g \"a/b/d/*\" \"-c core.ignorecase=0\" &&\n \ttest_must_fail attr_check A/B/D/NO \"a/b/d/*\" \"-c core.ignorecase=0\" &&\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex bb4f886..57fc1f2 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -666,3 +666,13 @@ rm -f y\n # When the tests are run as root, permission tests will report that\n # things are writable when they shouldn't be.\n test -w / || test_set_prereq SANITY\n+\n+# check whether FS is case-insensitive\n+mkdir junk &&\n+echo good >junk/CamelCase && \n+echo bad >junk/camelcase &&\n+if test \"$(cat junk/CamelCase)\" != good\n+then\n+\ttest_set_prereq CASE_INSENSITIVE_FS\n+fi\n+rm -rf junk\n-- \n1.7.12.rc0.198.gd66b616\n"},{"id":"195858","messageId":"d404f849524e47602f72de88b4487863d23a60d1.1343309173.git.git@drmicha.warpmail.net","threadId":"31026","inReplyTo":"5001B82B.1060201@web.de","subject":"[PATCH 2/5] t0050: use the CASE_INSENSITIVE_FS test prereq","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-07-26T13:39:54Z","receivedAt":"2012-07-26T13:39:54Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n t/t0050-filesystem.sh | 21 ++++++++-------------\n 1 file changed, 8 insertions(+), 13 deletions(-)\n\ndiff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh\nindex 1542cf6..df9498b 100755\n--- a/t/t0050-filesystem.sh\n+++ b/t/t0050-filesystem.sh\n@@ -7,23 +7,12 @@ test_description='Various filesystem issues'\n auml=$(printf '\\303\\244')\n aumlcdiar=$(printf '\\141\\314\\210')\n \n-case_insensitive=\n unibad=\n no_symlinks=\n test_expect_success 'see what we expect' '\n \n-\ttest_case=test_expect_success &&\n \ttest_unicode=test_expect_success &&\n \tmkdir junk &&\n-\techo good >junk/CamelCase &&\n-\techo bad >junk/camelcase &&\n-\tif test \"$(cat junk/CamelCase)\" != good\n-\tthen\n-\t\ttest_case=test_expect_failure &&\n-\t\tcase_insensitive=t\n-\tfi &&\n-\trm -fr junk &&\n-\tmkdir junk &&\n \t>junk/\"$auml\" &&\n \tcase \"$(cd junk && echo *)\" in\n \t\"$aumlcdiar\")\n@@ -41,14 +30,20 @@ test_expect_success 'see what we expect' '\n \t}\n '\n \n-test \"$case_insensitive\" &&\n+if test_have_prereq CASE_INSENSITIVE_FS\n+then\n \tsay \"will test on a case insensitive filesystem\"\n+\ttest_case=test_expect_failure\n+else\n+\ttest_case=test_expect_success\n+fi\n+\n test \"$unibad\" &&\n \tsay \"will test on a unicode corrupting filesystem\"\n test \"$no_symlinks\" &&\n \tsay \"will test on a filesystem lacking symbolic links\"\n \n-if test \"$case_insensitive\"\n+if test_have_prereq CASE_INSENSITIVE_FS\n then\n test_expect_success \"detection of case insensitive filesystem during repo init\" '\n \n-- \n1.7.12.rc0.198.gd66b616\n"},{"id":"195854","messageId":"8a35a99e9694af4cccda19199c7543d748d41d73.1343309173.git.git@drmicha.warpmail.net","threadId":"31026","inReplyTo":"5001B82B.1060201@web.de","subject":"[PATCH 3/5] t0050: use the SYMLINKS test prereq","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-07-26T13:39:55Z","receivedAt":"2012-07-26T13:39:55Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n t/t0050-filesystem.sh | 21 +++++++--------------\n 1 file changed, 7 insertions(+), 14 deletions(-)\n\ndiff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh\nindex df9498b..b46ae72 100755\n--- a/t/t0050-filesystem.sh\n+++ b/t/t0050-filesystem.sh\n@@ -8,7 +8,6 @@ auml=$(printf '\\303\\244')\n aumlcdiar=$(printf '\\141\\314\\210')\n \n unibad=\n-no_symlinks=\n test_expect_success 'see what we expect' '\n \n \ttest_unicode=test_expect_success &&\n@@ -21,13 +20,7 @@ test_expect_success 'see what we expect' '\n \t\t;;\n \t*)\t;;\n \tesac &&\n-\trm -fr junk &&\n-\t{\n-\t\tln -s x y 2> /dev/null &&\n-\t\ttest -h y 2> /dev/null ||\n-\t\tno_symlinks=1 &&\n-\t\trm -f y\n-\t}\n+\trm -fr junk\n '\n \n if test_have_prereq CASE_INSENSITIVE_FS\n@@ -40,7 +33,7 @@ fi\n \n test \"$unibad\" &&\n \tsay \"will test on a unicode corrupting filesystem\"\n-test \"$no_symlinks\" &&\n+test_have_prereq SYMLINKS ||\n \tsay \"will test on a filesystem lacking symbolic links\"\n \n if test_have_prereq CASE_INSENSITIVE_FS\n@@ -57,18 +50,18 @@ test_expect_success \"detection of case insensitive filesystem during repo init\"\n '\n fi\n \n-if test \"$no_symlinks\"\n+if test_have_prereq SYMLINKS\n then\n test_expect_success \"detection of filesystem w/o symlink support during repo init\" '\n \n-\tv=$(git config --bool core.symlinks) &&\n-\ttest \"$v\" = false\n+\ttest_must_fail git config --bool core.symlinks ||\n+\ttest \"$(git config --bool core.symlinks)\" = true\n '\n else\n test_expect_success \"detection of filesystem w/o symlink support during repo init\" '\n \n-\ttest_must_fail git config --bool core.symlinks ||\n-\ttest \"$(git config --bool core.symlinks)\" = true\n+\tv=$(git config --bool core.symlinks) &&\n+\ttest \"$v\" = false\n '\n fi\n \n-- \n1.7.12.rc0.198.gd66b616\n"},{"id":"195857","messageId":"2d9b28dacc3e83d7aab1c3266bfbc53a3d3db906.1343309173.git.git@drmicha.warpmail.net","threadId":"31026","inReplyTo":"5001B82B.1060201@web.de","subject":"[PATCH 4/5] test-lib: provide UTF8 behaviour as a prerequisite","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-07-26T13:39:56Z","receivedAt":"2012-07-26T13:39:56Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"UTF8 behaviour of the filesystem (conversion from nfd to nfc)  plays a\nrole in several tests and is tested in several tests. Therefore, move\nthe test from t0050 into the test lib and use the prerequisite in t0050.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n t/README              |  5 +++++\n t/t0050-filesystem.sh | 24 +++++++-----------------\n t/test-lib.sh         | 14 ++++++++++++++\n 3 files changed, 26 insertions(+), 17 deletions(-)\n\ndiff --git a/t/README b/t/README\nindex 5725607..e4128e5 100644\n--- a/t/README\n+++ b/t/README\n@@ -629,6 +629,11 @@ use these, and \"test_set_prereq\" for how to define your own.\n \n    Test is run on a case insensitive file system.\n \n+ - UTF8_NFD_TO_NFC\n+\n+   Test is run on a filesystem which converts decomposed utf-8 (nfd)\n+   to precomposed utf-8 (nfc).\n+\n Tips for Writing Tests\n ----------------------\n \ndiff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh\nindex b46ae72..78816d9 100755\n--- a/t/t0050-filesystem.sh\n+++ b/t/t0050-filesystem.sh\n@@ -7,22 +7,6 @@ test_description='Various filesystem issues'\n auml=$(printf '\\303\\244')\n aumlcdiar=$(printf '\\141\\314\\210')\n \n-unibad=\n-test_expect_success 'see what we expect' '\n-\n-\ttest_unicode=test_expect_success &&\n-\tmkdir junk &&\n-\t>junk/\"$auml\" &&\n-\tcase \"$(cd junk && echo *)\" in\n-\t\"$aumlcdiar\")\n-\t\ttest_unicode=test_expect_failure &&\n-\t\tunibad=t\n-\t\t;;\n-\t*)\t;;\n-\tesac &&\n-\trm -fr junk\n-'\n-\n if test_have_prereq CASE_INSENSITIVE_FS\n then\n \tsay \"will test on a case insensitive filesystem\"\n@@ -31,8 +15,14 @@ else\n \ttest_case=test_expect_success\n fi\n \n-test \"$unibad\" &&\n+if test_have_prereq UTF8_NFD_TO_NFC\n+then\n \tsay \"will test on a unicode corrupting filesystem\"\n+\ttest_unicode=test_expect_failure\n+else\n+\ttest_unicode=test_expect_success\n+fi\n+\n test_have_prereq SYMLINKS ||\n \tsay \"will test on a filesystem lacking symbolic links\"\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 57fc1f2..057ac1d 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -676,3 +676,17 @@ then\n \ttest_set_prereq CASE_INSENSITIVE_FS\n fi\n rm -rf junk\n+\n+# check whether FS converts nfd unicode to nfc\n+auml=$(printf '\\303\\244')\n+aumlcdiar=$(printf '\\141\\314\\210')\n+\n+mkdir junk &&\n+>junk/\"$auml\" &&\n+case \"$(cd junk && echo *)\" in\n+\"$aumlcdiar\")\n+\ttest_set_prereq UTF8_NFD_TO_NFC\n+\t;;\n+*)\t;;\n+esac\n+rm -fr junk\n-- \n1.7.12.rc0.198.gd66b616\n"},{"id":"195856","messageId":"af454679a3544e8a33764d92c894af6de66b0815.1343309173.git.git@drmicha.warpmail.net","threadId":"31026","inReplyTo":"5001B82B.1060201@web.de","subject":"[PATCH 5/5] t3910: use the SYMLINKS test prereq","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-07-26T13:39:57Z","receivedAt":"2012-07-26T13:39:57Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Besides reusing the new test prerequisite, this fixes also the issue\nthat the current output is not TAP compliant and produces the output \"no\nreason given\" [for skipping].\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n t/t3910-mac-os-precompose.sh | 281 +++++++++++++++++++++----------------------\n 1 file changed, 135 insertions(+), 146 deletions(-)\n\ndiff --git a/t/t3910-mac-os-precompose.sh b/t/t3910-mac-os-precompose.sh\nindex 88b7a20..9244b69 100755\n--- a/t/t3910-mac-os-precompose.sh\n+++ b/t/t3910-mac-os-precompose.sh\n@@ -7,158 +7,147 @@ test_description='utf-8 decomposed (nfd) converted to precomposed (nfc)'\n \n . ./test-lib.sh\n \n+if ! test_have_prereq UTF8_NFD_TO_NFC\n+then\n+\tskip_all=\"filesystem does not convert utf-8 nfd to nfc\"\n+\ttest_done\n+fi\n+\n+# create utf-8 variables\n Adiarnfc=`printf '\\303\\204'`\n Adiarnfd=`printf 'A\\314\\210'`\n \n-# check if the feature is compiled in\n-mkdir junk &&\n->junk/\"$Adiarnfc\" &&\n-case \"$(cd junk && echo *)\" in\n-\t\"$Adiarnfd\")\n-\ttest_nfd=1\n-\t;;\n-\t*)\t;;\n-esac\n-rm -rf junk\n+Odiarnfc=`printf '\\303\\226'`\n+Odiarnfd=`printf 'O\\314\\210'`\n+AEligatu=`printf '\\303\\206'`\n+Invalidu=`printf '\\303\\377'`\n \n \n-if test \"$test_nfd\"\n-then\n-\t# create more utf-8 variables\n-\tOdiarnfc=`printf '\\303\\226'`\n-\tOdiarnfd=`printf 'O\\314\\210'`\n-\tAEligatu=`printf '\\303\\206'`\n-\tInvalidu=`printf '\\303\\377'`\n+#Create a string with 255 bytes (decomposed)\n+Alongd=$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd #21 Byte\n+Alongd=$Alongd$Alongd$Alongd                                           #63 Byte\n+Alongd=$Alongd$Alongd$Alongd$Alongd$Adiarnfd                           #255 Byte\n \n+#Create a string with 254 bytes (precomposed)\n+Alongc=$AEligatu$AEligatu$AEligatu$AEligatu$AEligatu #10 Byte\n+Alongc=$Alongc$Alongc$Alongc$Alongc$Alongc           #50 Byte\n+Alongc=$Alongc$Alongc$Alongc$Alongc$Alongc           #250 Byte\n+Alongc=$Alongc$AEligatu$AEligatu                     #254 Byte\n \n-\t#Create a string with 255 bytes (decomposed)\n-\tAlongd=$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd #21 Byte\n-\tAlongd=$Alongd$Alongd$Alongd                                           #63 Byte\n-\tAlongd=$Alongd$Alongd$Alongd$Alongd$Adiarnfd                           #255 Byte\n-\n-\t#Create a string with 254 bytes (precomposed)\n-\tAlongc=$AEligatu$AEligatu$AEligatu$AEligatu$AEligatu #10 Byte\n-\tAlongc=$Alongc$Alongc$Alongc$Alongc$Alongc           #50 Byte\n-\tAlongc=$Alongc$Alongc$Alongc$Alongc$Alongc           #250 Byte\n-\tAlongc=$Alongc$AEligatu$AEligatu                     #254 Byte\n-\n-\ttest_expect_success \"detect if nfd needed\" '\n-\t\tprecomposeunicode=`git config core.precomposeunicode` &&\n-\t\ttest \"$precomposeunicode\" = false &&\n-\t\tgit config core.precomposeunicode true\n-\t'\n-\ttest_expect_success \"setup\" '\n-\t\t>x &&\n-\t\tgit add x &&\n-\t\tgit commit -m \"1st commit\" &&\n-\t\tgit rm x &&\n-\t\tgit commit -m \"rm x\"\n-\t'\n-\ttest_expect_success \"setup case mac\" '\n-\t\tgit checkout -b mac_os\n-\t'\n-\t# This will test nfd2nfc in readdir()\n-\ttest_expect_success \"add file Adiarnfc\" '\n-\t\techo f.Adiarnfc >f.$Adiarnfc &&\n-\t\tgit add f.$Adiarnfc &&\n-\t\tgit commit -m \"add f.$Adiarnfc\"\n-\t'\n-\t# This will test nfd2nfc in git stage()\n-\ttest_expect_success \"stage file d.Adiarnfd/f.Adiarnfd\" '\n-\t\tmkdir d.$Adiarnfd &&\n-\t\techo d.$Adiarnfd/f.$Adiarnfd >d.$Adiarnfd/f.$Adiarnfd &&\n-\t\tgit stage d.$Adiarnfd/f.$Adiarnfd &&\n-\t\tgit commit -m \"add d.$Adiarnfd/f.$Adiarnfd\"\n-\t'\n-\ttest_expect_success \"add link Adiarnfc\" '\n-\t\tln -s d.$Adiarnfd/f.$Adiarnfd l.$Adiarnfc &&\n-\t\tgit add l.$Adiarnfc &&\n-\t\tgit commit -m \"add l.Adiarnfc\"\n-\t'\n-\t# This will test git log\n-\ttest_expect_success \"git log f.Adiar\" '\n-\t\tgit log f.$Adiarnfc > f.Adiarnfc.log &&\n-\t\tgit log f.$Adiarnfd > f.Adiarnfd.log &&\n-\t\ttest -s f.Adiarnfc.log &&\n-\t\ttest -s f.Adiarnfd.log &&\n-\t\ttest_cmp f.Adiarnfc.log f.Adiarnfd.log &&\n-\t\trm f.Adiarnfc.log f.Adiarnfd.log\n-\t'\n-\t# This will test git ls-files\n-\ttest_expect_success \"git lsfiles f.Adiar\" '\n-\t\tgit ls-files f.$Adiarnfc > f.Adiarnfc.log &&\n-\t\tgit ls-files f.$Adiarnfd > f.Adiarnfd.log &&\n-\t\ttest -s f.Adiarnfc.log &&\n-\t\ttest -s f.Adiarnfd.log &&\n-\t\ttest_cmp f.Adiarnfc.log f.Adiarnfd.log &&\n-\t\trm f.Adiarnfc.log f.Adiarnfd.log\n-\t'\n-\t# This will test git mv\n-\ttest_expect_success \"git mv\" '\n-\t\tgit mv f.$Adiarnfd f.$Odiarnfc &&\n-\t\tgit mv d.$Adiarnfd d.$Odiarnfc &&\n-\t\tgit mv l.$Adiarnfd l.$Odiarnfc &&\n-\t\tgit commit -m \"mv Adiarnfd Odiarnfc\"\n-\t'\n-\t# Files can be checked out as nfc\n-\t# And the link has been corrected from nfd to nfc\n-\ttest_expect_success \"git checkout nfc\" '\n-\t\trm f.$Odiarnfc &&\n-\t\tgit checkout f.$Odiarnfc\n-\t'\n-\t# Make it possible to checkout files with their NFD names\n-\ttest_expect_success \"git checkout file nfd\" '\n-\t\trm -f f.* &&\n-\t\tgit checkout f.$Odiarnfd\n-\t'\n-\t# Make it possible to checkout links with their NFD names\n-\ttest_expect_success \"git checkout link nfd\" '\n-\t\trm l.* &&\n-\t\tgit checkout l.$Odiarnfd\n-\t'\n-\ttest_expect_success \"setup case mac2\" '\n-\t\tgit checkout master &&\n-\t\tgit reset --hard &&\n-\t\tgit checkout -b mac_os_2\n-\t'\n-\t# This will test nfd2nfc in git commit\n-\ttest_expect_success \"commit file d2.Adiarnfd/f.Adiarnfd\" '\n-\t\tmkdir d2.$Adiarnfd &&\n-\t\techo d2.$Adiarnfd/f.$Adiarnfd >d2.$Adiarnfd/f.$Adiarnfd &&\n-\t\tgit add d2.$Adiarnfd/f.$Adiarnfd &&\n-\t\tgit commit -m \"add d2.$Adiarnfd/f.$Adiarnfd\" -- d2.$Adiarnfd/f.$Adiarnfd\n-\t'\n-\ttest_expect_success \"setup for long decomposed filename\" '\n-\t\tgit checkout master &&\n-\t\tgit reset --hard &&\n-\t\tgit checkout -b mac_os_long_nfd_fn\n-\t'\n-\ttest_expect_success \"Add long decomposed filename\" '\n-\t\techo longd >$Alongd &&\n-\t\tgit add * &&\n-\t\tgit commit -m \"Long filename\"\n-\t'\n-\ttest_expect_success \"setup for long precomposed filename\" '\n-\t\tgit checkout master &&\n-\t\tgit reset --hard &&\n-\t\tgit checkout -b mac_os_long_nfc_fn\n-\t'\n-\ttest_expect_success \"Add long precomposed filename\" '\n-\t\techo longc >$Alongc &&\n-\t\tgit add * &&\n-\t\tgit commit -m \"Long filename\"\n-\t'\n-\t# Test if the global core.precomposeunicode stops autosensing\n-\t# Must be the last test case\n-\ttest_expect_success \"respect git config --global core.precomposeunicode\" '\n-\t\tgit config --global core.precomposeunicode true &&\n-\t\trm -rf .git &&\n-\t\tgit init &&\n-\t\tprecomposeunicode=`git config core.precomposeunicode` &&\n-\t\ttest \"$precomposeunicode\" = \"true\"\n-\t'\n-else\n-\t say \"Skipping nfc/nfd tests\"\n-fi\n+test_expect_success \"detect if nfd needed\" '\n+\tprecomposeunicode=`git config core.precomposeunicode` &&\n+\ttest \"$precomposeunicode\" = false &&\n+\tgit config core.precomposeunicode true\n+'\n+test_expect_success \"setup\" '\n+\t>x &&\n+\tgit add x &&\n+\tgit commit -m \"1st commit\" &&\n+\tgit rm x &&\n+\tgit commit -m \"rm x\"\n+'\n+test_expect_success \"setup case mac\" '\n+\tgit checkout -b mac_os\n+'\n+# This will test nfd2nfc in readdir()\n+test_expect_success \"add file Adiarnfc\" '\n+\techo f.Adiarnfc >f.$Adiarnfc &&\n+\tgit add f.$Adiarnfc &&\n+\tgit commit -m \"add f.$Adiarnfc\"\n+'\n+# This will test nfd2nfc in git stage()\n+test_expect_success \"stage file d.Adiarnfd/f.Adiarnfd\" '\n+\tmkdir d.$Adiarnfd &&\n+\techo d.$Adiarnfd/f.$Adiarnfd >d.$Adiarnfd/f.$Adiarnfd &&\n+\tgit stage d.$Adiarnfd/f.$Adiarnfd &&\n+\tgit commit -m \"add d.$Adiarnfd/f.$Adiarnfd\"\n+'\n+test_expect_success \"add link Adiarnfc\" '\n+\tln -s d.$Adiarnfd/f.$Adiarnfd l.$Adiarnfc &&\n+\tgit add l.$Adiarnfc &&\n+\tgit commit -m \"add l.Adiarnfc\"\n+'\n+# This will test git log\n+test_expect_success \"git log f.Adiar\" '\n+\tgit log f.$Adiarnfc > f.Adiarnfc.log &&\n+\tgit log f.$Adiarnfd > f.Adiarnfd.log &&\n+\ttest -s f.Adiarnfc.log &&\n+\ttest -s f.Adiarnfd.log &&\n+\ttest_cmp f.Adiarnfc.log f.Adiarnfd.log &&\n+\trm f.Adiarnfc.log f.Adiarnfd.log\n+'\n+# This will test git ls-files\n+test_expect_success \"git lsfiles f.Adiar\" '\n+\tgit ls-files f.$Adiarnfc > f.Adiarnfc.log &&\n+\tgit ls-files f.$Adiarnfd > f.Adiarnfd.log &&\n+\ttest -s f.Adiarnfc.log &&\n+\ttest -s f.Adiarnfd.log &&\n+\ttest_cmp f.Adiarnfc.log f.Adiarnfd.log &&\n+\trm f.Adiarnfc.log f.Adiarnfd.log\n+'\n+# This will test git mv\n+test_expect_success \"git mv\" '\n+\tgit mv f.$Adiarnfd f.$Odiarnfc &&\n+\tgit mv d.$Adiarnfd d.$Odiarnfc &&\n+\tgit mv l.$Adiarnfd l.$Odiarnfc &&\n+\tgit commit -m \"mv Adiarnfd Odiarnfc\"\n+'\n+# Files can be checked out as nfc\n+# And the link has been corrected from nfd to nfc\n+test_expect_success \"git checkout nfc\" '\n+\trm f.$Odiarnfc &&\n+\tgit checkout f.$Odiarnfc\n+'\n+# Make it possible to checkout files with their NFD names\n+test_expect_success \"git checkout file nfd\" '\n+\trm -f f.* &&\n+\tgit checkout f.$Odiarnfd\n+'\n+# Make it possible to checkout links with their NFD names\n+test_expect_success \"git checkout link nfd\" '\n+\trm l.* &&\n+\tgit checkout l.$Odiarnfd\n+'\n+test_expect_success \"setup case mac2\" '\n+\tgit checkout master &&\n+\tgit reset --hard &&\n+\tgit checkout -b mac_os_2\n+'\n+# This will test nfd2nfc in git commit\n+test_expect_success \"commit file d2.Adiarnfd/f.Adiarnfd\" '\n+\tmkdir d2.$Adiarnfd &&\n+\techo d2.$Adiarnfd/f.$Adiarnfd >d2.$Adiarnfd/f.$Adiarnfd &&\n+\tgit add d2.$Adiarnfd/f.$Adiarnfd &&\n+\tgit commit -m \"add d2.$Adiarnfd/f.$Adiarnfd\" -- d2.$Adiarnfd/f.$Adiarnfd\n+'\n+test_expect_success \"setup for long decomposed filename\" '\n+\tgit checkout master &&\n+\tgit reset --hard &&\n+\tgit checkout -b mac_os_long_nfd_fn\n+'\n+test_expect_success \"Add long decomposed filename\" '\n+\techo longd >$Alongd &&\n+\tgit add * &&\n+\tgit commit -m \"Long filename\"\n+'\n+test_expect_success \"setup for long precomposed filename\" '\n+\tgit checkout master &&\n+\tgit reset --hard &&\n+\tgit checkout -b mac_os_long_nfc_fn\n+'\n+test_expect_success \"Add long precomposed filename\" '\n+\techo longc >$Alongc &&\n+\tgit add * &&\n+\tgit commit -m \"Long filename\"\n+'\n+# Test if the global core.precomposeunicode stops autosensing\n+# Must be the last test case\n+test_expect_success \"respect git config --global core.precomposeunicode\" '\n+\tgit config --global core.precomposeunicode true &&\n+\trm -rf .git &&\n+\tgit init &&\n+\tprecomposeunicode=`git config core.precomposeunicode` &&\n+\ttest \"$precomposeunicode\" = \"true\"\n+'\n \n test_done\n-- \n1.7.12.rc0.198.gd66b616\n"},{"id":"195879","messageId":"7vtxwu75gy.fsf@alter.siamese.dyndns.org","threadId":"31026","inReplyTo":"cover.1343309173.git.git@drmicha.warpmail.net","subject":"Re: [PATCH 0/5] test-lib: filesystem prerequisites","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-26T18:16:45Z","receivedAt":"2012-07-26T18:16:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> This mini series provides and makes use of test prerequisites for\n> case insensitivity, symlinks and unicode conversion.\n>\n> SYMLINKS existed before but was not used in t0050.\n> CASE_INSENSITIVE_FS was defined in t0003 rather than test-lib (and redone in\n> t0050).\n> UTF8_NFD_TO_NFC did not exist but was redone in two ways in two tests.\n>\n> After this series, all 3 are defined in test-lib and used in the various tests.\n\nConsolidating the logic to set necessary prerequisites used in\nvarious scripts is very good, but I am not sure adding them to\ntest-lib and run them unconditionally is a good idea.  SYMLINKS is\nused by 47 among 595 tests, which is common enough, but the new ones\nare not common enough.  I do not think we want to create a temporary\n\"junk\" dir, two temporary \"camelcase\" files, read and compare them,\nwhen nobody in the script cares.\n\nWe do not have to split them into separate include files, though, in\norder to avoid such waste.  Instead, you can make the logic to set\nprerequisite conditional inside test-lib.sh and update the users.\n\nSomething like:\n\n\t(in t/test-lib.sh)\n\tcase \",$TEST_WANT_PREREQ,\" in\n\t*,CASE_INSENSITIVE_FS,*)\n\t\tmkdir junk &&\n                echo good >junk/CamelCase &&\n                echo bad >junk/camelcase &&\n                test \"$(cat junk/CamelCase)\" == good ||\n                test_set_prereq CASE_INSENSITIVE_FS\n\t\trm -fr junk\n\tesac\n\n\t(at the beginning of t/t0003-attributes.sh)\n\t#!/bin/sh\n        test_description=gitattributes\n        TEST_WANT_PREREQ=CASE_INSENSITIVE_FS,SYMLINKS\n\t. ./test-lib.sh\n\nThanks.\n"},{"id":"195881","messageId":"20120726184337.GB16037@sigill.intra.peff.net","threadId":"31026","inReplyTo":"7vtxwu75gy.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 0/5] test-lib: filesystem prerequisites","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-07-26T18:43:37Z","receivedAt":"2012-07-26T18:43:37Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jul 26, 2012 at 11:16:45AM -0700, Junio C Hamano wrote:\n\n> Consolidating the logic to set necessary prerequisites used in\n> various scripts is very good, but I am not sure adding them to\n> test-lib and run them unconditionally is a good idea.  SYMLINKS is\n> used by 47 among 595 tests, which is common enough, but the new ones\n> are not common enough.  I do not think we want to create a temporary\n> \"junk\" dir, two temporary \"camelcase\" files, read and compare them,\n> when nobody in the script cares.\n> \n> We do not have to split them into separate include files, though, in\n> order to avoid such waste.  Instead, you can make the logic to set\n> prerequisite conditional inside test-lib.sh and update the users.\n> \n> Something like:\n> [...]\n> \t(at the beginning of t/t0003-attributes.sh)\n> \t#!/bin/sh\n>         test_description=gitattributes\n>         TEST_WANT_PREREQ=CASE_INSENSITIVE_FS,SYMLINKS\n> \t. ./test-lib.sh\n\nThat looks like a maintenance annoyance. Can't we just have the\nprerequisite-checker lazily perform the test on demand and cache the\nresult?  It should be OK as long as:\n\n  1. The prereq is careful about its pre- and post- conditions. We\n     already make sure to clean up after those tests so as not to taint\n     later tests. We would probably want to also make them more careful\n     about preconditions like which directory they are in (so, for\n     example, refer to \"$TRASH_DIRECTORY/junk\" and not \"junk\").\n\n  2. The prereq test does not accidentally munge any existing test\n     state from previous tests. That should not be a big deal as long as\n     we avoid names like \"junk\" in favor of more unique names like\n     \"check-case-sensitivity-prereq\".\n\n-Peff\n"},{"id":"195890","messageId":"7vzk6m5ln9.fsf@alter.siamese.dyndns.org","threadId":"31026","inReplyTo":"20120726184337.GB16037@sigill.intra.peff.net","subject":"Re: [PATCH 0/5] test-lib: filesystem prerequisites","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-26T20:10:18Z","receivedAt":"2012-07-26T20:10:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> That looks like a maintenance annoyance. Can't we just have the\n> prerequisite-checker lazily perform the test on demand and cache the\n> result?  It should be OK as long as:\n>\n>   1. The prereq is careful about its pre- and post- conditions. We\n>      already make sure to clean up after those tests so as not to taint\n>      later tests. We would probably want to also make them more careful\n>      about preconditions like which directory they are in (so, for\n>      example, refer to \"$TRASH_DIRECTORY/junk\" and not \"junk\").\n>\n>   2. The prereq test does not accidentally munge any existing test\n>      state from previous tests. That should not be a big deal as long as\n>      we avoid names like \"junk\" in favor of more unique names like\n>      \"check-case-sensitivity-prereq\".\n\nYeah, it is very desirable if we could lazy-eval, and we _should_ be\nable to arrange the above.\n"},{"id":"195936","messageId":"50126005.7060202@drmicha.warpmail.net","threadId":"31026","inReplyTo":"7vzk6m5ln9.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 0/5] test-lib: filesystem prerequisites","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-07-27T09:31:49Z","receivedAt":"2012-07-27T09:31:49Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Junio C Hamano venit, vidit, dixit 26.07.2012 22:10:\n> Jeff King <peff@peff.net> writes:\n> \n>> That looks like a maintenance annoyance. Can't we just have the\n>> prerequisite-checker lazily perform the test on demand and cache the\n>> result?  It should be OK as long as:\n>>\n>>   1. The prereq is careful about its pre- and post- conditions. We\n>>      already make sure to clean up after those tests so as not to taint\n>>      later tests. We would probably want to also make them more careful\n>>      about preconditions like which directory they are in (so, for\n>>      example, refer to \"$TRASH_DIRECTORY/junk\" and not \"junk\").\n>>\n>>   2. The prereq test does not accidentally munge any existing test\n>>      state from previous tests. That should not be a big deal as long as\n>>      we avoid names like \"junk\" in favor of more unique names like\n>>      \"check-case-sensitivity-prereq\".\n> \n> Yeah, it is very desirable if we could lazy-eval, and we _should_ be\n> able to arrange the above.\n> \n\nYes, lazy-eval looks good and is probably easier than caching.\n\nThe adjustments to 1/5 and 4/5 look good.\n\n5/5 needs a fix in the subject line, sorry. It should be:\n\nt3910: use the UTF8_NFD_TO_NFC test prereq\n\n(5/5 hasn't hit next)\n\nThanks,\nMichael\n"},{"id":"195953","messageId":"7vboj115as.fsf@alter.siamese.dyndns.org","threadId":"31026","inReplyTo":"50126005.7060202@drmicha.warpmail.net","subject":"Re: [PATCH 0/5] test-lib: filesystem prerequisites","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-27T17:29:15Z","receivedAt":"2012-07-27T17:29:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> 5/5 needs a fix in the subject line, sorry. It should be:\n>\n> t3910: use the UTF8_NFD_TO_NFC test prereq\n>\n> (5/5 hasn't hit next)\n\nThat is because I thought that you would like the lazy-probe and\nthat you would be capable of rerolling it on your own ;-)\n"},{"id":"196113","messageId":"50165A6A.8010705@drmicha.warpmail.net","threadId":"31026","inReplyTo":"7vboj115as.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 0/5] test-lib: filesystem prerequisites","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-07-30T09:56:58Z","receivedAt":"2012-07-30T09:56:58Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Junio C Hamano venit, vidit, dixit 27.07.2012 19:29:\n> Michael J Gruber <git@drmicha.warpmail.net> writes:\n> \n>> 5/5 needs a fix in the subject line, sorry. It should be:\n>>\n>> t3910: use the UTF8_NFD_TO_NFC test prereq\n>>\n>> (5/5 hasn't hit next)\n> \n> That is because I thought that you would like the lazy-probe and\n> that you would be capable of rerolling it on your own ;-)\n> \n\nWell, I do like the lazy-probe, and I would like to lazy-probe ;)\n\nDue to the nice design of test_lazy_prereq, the test scripts don't need\nany adjustment in order to get lazy. Now, that's what I call lazy!\n\nSo, 5/5 does not need any reroll, right? Anyway, 5/5 with the proper\nsubject line comes in a minute.\n\nAnd thanks for the un-lazy lazyfing reroll of 1/5 and 4/5.\n\nMichael\n"},{"id":"196114","messageId":"de831564718b0d52d6ba6e9cb13020defdbfa359.1343641675.git.git@drmicha.warpmail.net","threadId":"31026","inReplyTo":"7vboj115as.fsf@alter.siamese.dyndns.org","subject":"[PATCHv2 5/5] t3910: use the UTF8_NFD_TO_NFC test prereq","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-07-30T09:57:18Z","receivedAt":"2012-07-30T09:57:18Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Besides reusing the new test prerequisite, this fixes also the issue\nthat the current output is not TAP compliant and produces the output \"no\nreason given\" [for skipping].\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\nSame patch, new subject line which matches the actual patch. Yeah.\n\n t/t3910-mac-os-precompose.sh | 281 +++++++++++++++++++++----------------------\n 1 file changed, 135 insertions(+), 146 deletions(-)\n\ndiff --git a/t/t3910-mac-os-precompose.sh b/t/t3910-mac-os-precompose.sh\nindex 88b7a20..9244b69 100755\n--- a/t/t3910-mac-os-precompose.sh\n+++ b/t/t3910-mac-os-precompose.sh\n@@ -7,158 +7,147 @@ test_description='utf-8 decomposed (nfd) converted to precomposed (nfc)'\n \n . ./test-lib.sh\n \n+if ! test_have_prereq UTF8_NFD_TO_NFC\n+then\n+\tskip_all=\"filesystem does not convert utf-8 nfd to nfc\"\n+\ttest_done\n+fi\n+\n+# create utf-8 variables\n Adiarnfc=`printf '\\303\\204'`\n Adiarnfd=`printf 'A\\314\\210'`\n \n-# check if the feature is compiled in\n-mkdir junk &&\n->junk/\"$Adiarnfc\" &&\n-case \"$(cd junk && echo *)\" in\n-\t\"$Adiarnfd\")\n-\ttest_nfd=1\n-\t;;\n-\t*)\t;;\n-esac\n-rm -rf junk\n+Odiarnfc=`printf '\\303\\226'`\n+Odiarnfd=`printf 'O\\314\\210'`\n+AEligatu=`printf '\\303\\206'`\n+Invalidu=`printf '\\303\\377'`\n \n \n-if test \"$test_nfd\"\n-then\n-\t# create more utf-8 variables\n-\tOdiarnfc=`printf '\\303\\226'`\n-\tOdiarnfd=`printf 'O\\314\\210'`\n-\tAEligatu=`printf '\\303\\206'`\n-\tInvalidu=`printf '\\303\\377'`\n+#Create a string with 255 bytes (decomposed)\n+Alongd=$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd #21 Byte\n+Alongd=$Alongd$Alongd$Alongd                                           #63 Byte\n+Alongd=$Alongd$Alongd$Alongd$Alongd$Adiarnfd                           #255 Byte\n \n+#Create a string with 254 bytes (precomposed)\n+Alongc=$AEligatu$AEligatu$AEligatu$AEligatu$AEligatu #10 Byte\n+Alongc=$Alongc$Alongc$Alongc$Alongc$Alongc           #50 Byte\n+Alongc=$Alongc$Alongc$Alongc$Alongc$Alongc           #250 Byte\n+Alongc=$Alongc$AEligatu$AEligatu                     #254 Byte\n \n-\t#Create a string with 255 bytes (decomposed)\n-\tAlongd=$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd$Adiarnfd #21 Byte\n-\tAlongd=$Alongd$Alongd$Alongd                                           #63 Byte\n-\tAlongd=$Alongd$Alongd$Alongd$Alongd$Adiarnfd                           #255 Byte\n-\n-\t#Create a string with 254 bytes (precomposed)\n-\tAlongc=$AEligatu$AEligatu$AEligatu$AEligatu$AEligatu #10 Byte\n-\tAlongc=$Alongc$Alongc$Alongc$Alongc$Alongc           #50 Byte\n-\tAlongc=$Alongc$Alongc$Alongc$Alongc$Alongc           #250 Byte\n-\tAlongc=$Alongc$AEligatu$AEligatu                     #254 Byte\n-\n-\ttest_expect_success \"detect if nfd needed\" '\n-\t\tprecomposeunicode=`git config core.precomposeunicode` &&\n-\t\ttest \"$precomposeunicode\" = false &&\n-\t\tgit config core.precomposeunicode true\n-\t'\n-\ttest_expect_success \"setup\" '\n-\t\t>x &&\n-\t\tgit add x &&\n-\t\tgit commit -m \"1st commit\" &&\n-\t\tgit rm x &&\n-\t\tgit commit -m \"rm x\"\n-\t'\n-\ttest_expect_success \"setup case mac\" '\n-\t\tgit checkout -b mac_os\n-\t'\n-\t# This will test nfd2nfc in readdir()\n-\ttest_expect_success \"add file Adiarnfc\" '\n-\t\techo f.Adiarnfc >f.$Adiarnfc &&\n-\t\tgit add f.$Adiarnfc &&\n-\t\tgit commit -m \"add f.$Adiarnfc\"\n-\t'\n-\t# This will test nfd2nfc in git stage()\n-\ttest_expect_success \"stage file d.Adiarnfd/f.Adiarnfd\" '\n-\t\tmkdir d.$Adiarnfd &&\n-\t\techo d.$Adiarnfd/f.$Adiarnfd >d.$Adiarnfd/f.$Adiarnfd &&\n-\t\tgit stage d.$Adiarnfd/f.$Adiarnfd &&\n-\t\tgit commit -m \"add d.$Adiarnfd/f.$Adiarnfd\"\n-\t'\n-\ttest_expect_success \"add link Adiarnfc\" '\n-\t\tln -s d.$Adiarnfd/f.$Adiarnfd l.$Adiarnfc &&\n-\t\tgit add l.$Adiarnfc &&\n-\t\tgit commit -m \"add l.Adiarnfc\"\n-\t'\n-\t# This will test git log\n-\ttest_expect_success \"git log f.Adiar\" '\n-\t\tgit log f.$Adiarnfc > f.Adiarnfc.log &&\n-\t\tgit log f.$Adiarnfd > f.Adiarnfd.log &&\n-\t\ttest -s f.Adiarnfc.log &&\n-\t\ttest -s f.Adiarnfd.log &&\n-\t\ttest_cmp f.Adiarnfc.log f.Adiarnfd.log &&\n-\t\trm f.Adiarnfc.log f.Adiarnfd.log\n-\t'\n-\t# This will test git ls-files\n-\ttest_expect_success \"git lsfiles f.Adiar\" '\n-\t\tgit ls-files f.$Adiarnfc > f.Adiarnfc.log &&\n-\t\tgit ls-files f.$Adiarnfd > f.Adiarnfd.log &&\n-\t\ttest -s f.Adiarnfc.log &&\n-\t\ttest -s f.Adiarnfd.log &&\n-\t\ttest_cmp f.Adiarnfc.log f.Adiarnfd.log &&\n-\t\trm f.Adiarnfc.log f.Adiarnfd.log\n-\t'\n-\t# This will test git mv\n-\ttest_expect_success \"git mv\" '\n-\t\tgit mv f.$Adiarnfd f.$Odiarnfc &&\n-\t\tgit mv d.$Adiarnfd d.$Odiarnfc &&\n-\t\tgit mv l.$Adiarnfd l.$Odiarnfc &&\n-\t\tgit commit -m \"mv Adiarnfd Odiarnfc\"\n-\t'\n-\t# Files can be checked out as nfc\n-\t# And the link has been corrected from nfd to nfc\n-\ttest_expect_success \"git checkout nfc\" '\n-\t\trm f.$Odiarnfc &&\n-\t\tgit checkout f.$Odiarnfc\n-\t'\n-\t# Make it possible to checkout files with their NFD names\n-\ttest_expect_success \"git checkout file nfd\" '\n-\t\trm -f f.* &&\n-\t\tgit checkout f.$Odiarnfd\n-\t'\n-\t# Make it possible to checkout links with their NFD names\n-\ttest_expect_success \"git checkout link nfd\" '\n-\t\trm l.* &&\n-\t\tgit checkout l.$Odiarnfd\n-\t'\n-\ttest_expect_success \"setup case mac2\" '\n-\t\tgit checkout master &&\n-\t\tgit reset --hard &&\n-\t\tgit checkout -b mac_os_2\n-\t'\n-\t# This will test nfd2nfc in git commit\n-\ttest_expect_success \"commit file d2.Adiarnfd/f.Adiarnfd\" '\n-\t\tmkdir d2.$Adiarnfd &&\n-\t\techo d2.$Adiarnfd/f.$Adiarnfd >d2.$Adiarnfd/f.$Adiarnfd &&\n-\t\tgit add d2.$Adiarnfd/f.$Adiarnfd &&\n-\t\tgit commit -m \"add d2.$Adiarnfd/f.$Adiarnfd\" -- d2.$Adiarnfd/f.$Adiarnfd\n-\t'\n-\ttest_expect_success \"setup for long decomposed filename\" '\n-\t\tgit checkout master &&\n-\t\tgit reset --hard &&\n-\t\tgit checkout -b mac_os_long_nfd_fn\n-\t'\n-\ttest_expect_success \"Add long decomposed filename\" '\n-\t\techo longd >$Alongd &&\n-\t\tgit add * &&\n-\t\tgit commit -m \"Long filename\"\n-\t'\n-\ttest_expect_success \"setup for long precomposed filename\" '\n-\t\tgit checkout master &&\n-\t\tgit reset --hard &&\n-\t\tgit checkout -b mac_os_long_nfc_fn\n-\t'\n-\ttest_expect_success \"Add long precomposed filename\" '\n-\t\techo longc >$Alongc &&\n-\t\tgit add * &&\n-\t\tgit commit -m \"Long filename\"\n-\t'\n-\t# Test if the global core.precomposeunicode stops autosensing\n-\t# Must be the last test case\n-\ttest_expect_success \"respect git config --global core.precomposeunicode\" '\n-\t\tgit config --global core.precomposeunicode true &&\n-\t\trm -rf .git &&\n-\t\tgit init &&\n-\t\tprecomposeunicode=`git config core.precomposeunicode` &&\n-\t\ttest \"$precomposeunicode\" = \"true\"\n-\t'\n-else\n-\t say \"Skipping nfc/nfd tests\"\n-fi\n+test_expect_success \"detect if nfd needed\" '\n+\tprecomposeunicode=`git config core.precomposeunicode` &&\n+\ttest \"$precomposeunicode\" = false &&\n+\tgit config core.precomposeunicode true\n+'\n+test_expect_success \"setup\" '\n+\t>x &&\n+\tgit add x &&\n+\tgit commit -m \"1st commit\" &&\n+\tgit rm x &&\n+\tgit commit -m \"rm x\"\n+'\n+test_expect_success \"setup case mac\" '\n+\tgit checkout -b mac_os\n+'\n+# This will test nfd2nfc in readdir()\n+test_expect_success \"add file Adiarnfc\" '\n+\techo f.Adiarnfc >f.$Adiarnfc &&\n+\tgit add f.$Adiarnfc &&\n+\tgit commit -m \"add f.$Adiarnfc\"\n+'\n+# This will test nfd2nfc in git stage()\n+test_expect_success \"stage file d.Adiarnfd/f.Adiarnfd\" '\n+\tmkdir d.$Adiarnfd &&\n+\techo d.$Adiarnfd/f.$Adiarnfd >d.$Adiarnfd/f.$Adiarnfd &&\n+\tgit stage d.$Adiarnfd/f.$Adiarnfd &&\n+\tgit commit -m \"add d.$Adiarnfd/f.$Adiarnfd\"\n+'\n+test_expect_success \"add link Adiarnfc\" '\n+\tln -s d.$Adiarnfd/f.$Adiarnfd l.$Adiarnfc &&\n+\tgit add l.$Adiarnfc &&\n+\tgit commit -m \"add l.Adiarnfc\"\n+'\n+# This will test git log\n+test_expect_success \"git log f.Adiar\" '\n+\tgit log f.$Adiarnfc > f.Adiarnfc.log &&\n+\tgit log f.$Adiarnfd > f.Adiarnfd.log &&\n+\ttest -s f.Adiarnfc.log &&\n+\ttest -s f.Adiarnfd.log &&\n+\ttest_cmp f.Adiarnfc.log f.Adiarnfd.log &&\n+\trm f.Adiarnfc.log f.Adiarnfd.log\n+'\n+# This will test git ls-files\n+test_expect_success \"git lsfiles f.Adiar\" '\n+\tgit ls-files f.$Adiarnfc > f.Adiarnfc.log &&\n+\tgit ls-files f.$Adiarnfd > f.Adiarnfd.log &&\n+\ttest -s f.Adiarnfc.log &&\n+\ttest -s f.Adiarnfd.log &&\n+\ttest_cmp f.Adiarnfc.log f.Adiarnfd.log &&\n+\trm f.Adiarnfc.log f.Adiarnfd.log\n+'\n+# This will test git mv\n+test_expect_success \"git mv\" '\n+\tgit mv f.$Adiarnfd f.$Odiarnfc &&\n+\tgit mv d.$Adiarnfd d.$Odiarnfc &&\n+\tgit mv l.$Adiarnfd l.$Odiarnfc &&\n+\tgit commit -m \"mv Adiarnfd Odiarnfc\"\n+'\n+# Files can be checked out as nfc\n+# And the link has been corrected from nfd to nfc\n+test_expect_success \"git checkout nfc\" '\n+\trm f.$Odiarnfc &&\n+\tgit checkout f.$Odiarnfc\n+'\n+# Make it possible to checkout files with their NFD names\n+test_expect_success \"git checkout file nfd\" '\n+\trm -f f.* &&\n+\tgit checkout f.$Odiarnfd\n+'\n+# Make it possible to checkout links with their NFD names\n+test_expect_success \"git checkout link nfd\" '\n+\trm l.* &&\n+\tgit checkout l.$Odiarnfd\n+'\n+test_expect_success \"setup case mac2\" '\n+\tgit checkout master &&\n+\tgit reset --hard &&\n+\tgit checkout -b mac_os_2\n+'\n+# This will test nfd2nfc in git commit\n+test_expect_success \"commit file d2.Adiarnfd/f.Adiarnfd\" '\n+\tmkdir d2.$Adiarnfd &&\n+\techo d2.$Adiarnfd/f.$Adiarnfd >d2.$Adiarnfd/f.$Adiarnfd &&\n+\tgit add d2.$Adiarnfd/f.$Adiarnfd &&\n+\tgit commit -m \"add d2.$Adiarnfd/f.$Adiarnfd\" -- d2.$Adiarnfd/f.$Adiarnfd\n+'\n+test_expect_success \"setup for long decomposed filename\" '\n+\tgit checkout master &&\n+\tgit reset --hard &&\n+\tgit checkout -b mac_os_long_nfd_fn\n+'\n+test_expect_success \"Add long decomposed filename\" '\n+\techo longd >$Alongd &&\n+\tgit add * &&\n+\tgit commit -m \"Long filename\"\n+'\n+test_expect_success \"setup for long precomposed filename\" '\n+\tgit checkout master &&\n+\tgit reset --hard &&\n+\tgit checkout -b mac_os_long_nfc_fn\n+'\n+test_expect_success \"Add long precomposed filename\" '\n+\techo longc >$Alongc &&\n+\tgit add * &&\n+\tgit commit -m \"Long filename\"\n+'\n+# Test if the global core.precomposeunicode stops autosensing\n+# Must be the last test case\n+test_expect_success \"respect git config --global core.precomposeunicode\" '\n+\tgit config --global core.precomposeunicode true &&\n+\trm -rf .git &&\n+\tgit init &&\n+\tprecomposeunicode=`git config core.precomposeunicode` &&\n+\ttest \"$precomposeunicode\" = \"true\"\n+'\n \n test_done\n-- \n1.7.12.rc0.227.g767c5be\n"},{"id":"196144","messageId":"7vtxwps1w1.fsf@alter.siamese.dyndns.org","threadId":"31026","inReplyTo":"de831564718b0d52d6ba6e9cb13020defdbfa359.1343641675.git.git@drmicha.warpmail.net","subject":"Re: [PATCHv2 5/5] t3910: use the UTF8_NFD_TO_NFC test prereq","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-30T15:29:50Z","receivedAt":"2012-07-30T15:29:50Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> Besides reusing the new test prerequisite, this fixes also the issue\n> that the current output is not TAP compliant and produces the output \"no\n> reason given\" [for skipping].\n>\n> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n> ---\n> Same patch, new subject line which matches the actual patch. Yeah.\n\nThanks; queued.\n"},{"id":"196450","messageId":"501CB52D.6080208@web.de","threadId":"31026","inReplyTo":"de831564718b0d52d6ba6e9cb13020defdbfa359.1343641675.git.git@drmicha.warpmail.net","subject":"Re: [PATCHv2 5/5] t3910: use the UTF8_NFD_TO_NFC test prereq","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2012-08-04T05:37:49Z","receivedAt":"2012-08-04T05:37:49Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"Am 2012-07-30 11:57, schrieb Michael J Gruber:\n(Sorry being late)\n\nThat line:\n>skip_all=\"filesystem does not convert utf-8 nfd to nfc\"\n\nshouldn't it be the other way around?\nskip_all=\"filesystem does not convert utf-8 nfc to nfd\"\n\n(and may be the following may be more easy to read:)\nskip_all=\"filesystem does not decompose unicode\"\n\n\nSide note: t0050 uses another term:\n\"will test on a unicode corrupting filesystem\"\n\n/Torsten\n"},{"id":"196471","messageId":"7vboiq9uv7.fsf@alter.siamese.dyndns.org","threadId":"31026","inReplyTo":"501CB52D.6080208@web.de","subject":"Re: [PATCHv2 5/5] t3910: use the UTF8_NFD_TO_NFC test prereq","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-08-04T22:04:44Z","receivedAt":"2012-08-04T22:04:44Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Torsten Bögershausen <tboegi@web.de> writes:\n\n> Am 2012-07-30 11:57, schrieb Michael J Gruber:\n> (Sorry being late)\n>\n> That line:\n>>skip_all=\"filesystem does not convert utf-8 nfd to nfc\"\n>\n> shouldn't it be the other way around?\n> skip_all=\"filesystem does not convert utf-8 nfc to nfd\"\n>\n> (and may be the following may be more easy to read:)\n> skip_all=\"filesystem does not decompose unicode\"\n>\n>\n> Side note: t0050 uses another term:\n> \"will test on a unicode corrupting filesystem\"\n\nI am OK with either of the last two.  Thanks for noticing.\n"},{"id":"196541","messageId":"501FBC2A.1070403@drmicha.warpmail.net","threadId":"31026","inReplyTo":"7vboiq9uv7.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCHv2 5/5] t3910: use the UTF8_NFD_TO_NFC test prereq","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-08-06T12:44:26Z","receivedAt":"2012-08-06T12:44:26Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Junio C Hamano venit, vidit, dixit 05.08.2012 00:04:\n> Torsten Bögershausen <tboegi@web.de> writes:\n> \n>> Am 2012-07-30 11:57, schrieb Michael J Gruber:\n>> (Sorry being late)\n>>\n>> That line:\n>>> skip_all=\"filesystem does not convert utf-8 nfd to nfc\"\n>>\n>> shouldn't it be the other way around?\n>> skip_all=\"filesystem does not convert utf-8 nfc to nfd\"\n>>\n>> (and may be the following may be more easy to read:)\n>> skip_all=\"filesystem does not decompose unicode\"\n>>\n>>\n>> Side note: t0050 uses another term:\n>> \"will test on a unicode corrupting filesystem\"\n> \n> I am OK with either of the last two.  Thanks for noticing.\n\nI had taken the test description from t3910. But that referred to Git's\nundoing of the conversion done by the filesystem...\n\nIt's best to have it analogous to t0050 as in Junio's fixup.\n\nThanks!\nMichael\n[resent with cc: list...]\n"}]}