{"thread":{"id":"41249","subject":"[PATCH v1] t0027: Add tests for get_stream_filter()","startedAt":"2016-01-23T14:08:21Z","lastAt":"2016-01-23T23:29:41Z","messageCount":2,"participants":["tboegi@web.de","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"276611","messageId":"1453558101-6858-1-git-send-email-tboegi@web.de","threadId":"41249","inReplyTo":null,"subject":"[PATCH v1] t0027: Add tests for get_stream_filter()","fromName":"","fromEmail":"tboegi@web.de","sentAt":"2016-01-23T14:08:21Z","receivedAt":"2016-01-23T14:08:21Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"From: Torsten Bögershausen <tboegi@web.de>\n\nWhen a filter is configured, a different code-path is used in\nconvert.c and entry.c via get_stream_filter(), but there are no test cases yet.\n\nAdd tests for the filter API by configuring the ident filter.\nThe result of the SHA1 conversion is not checked, this is already\ndone in other TC.\n\nAdd a paramter to checkout_files() in t0027.\nWhile changing the signature, add another parameter for the eol= attribute.\nThis is currently unused,\ntests for e.g. \"* text=auto eol=lf\" will be added in a separate commit.\n---\n t/t0027-auto-crlf.sh | 261 ++++++++++++++++++++++++++++-----------------------\n 1 file changed, 146 insertions(+), 115 deletions(-)\n\ndiff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh\nindex 504e5a0..c148edc 100755\n--- a/t/t0027-auto-crlf.sh\n+++ b/t/t0027-auto-crlf.sh\n@@ -22,31 +22,45 @@ compare_ws_file () {\n \texp=$2.expect\n \tact=$pfx.actual.$3\n \ttr '\\015\\000' QN <\"$2\" >\"$exp\" &&\n-\ttr '\\015\\000' QN <\"$3\" >\"$act\" &&\n+\ttr '\\015\\000' QN <\"$3\" |\n+\t\tsed -e \"s/Id: ........................................ /Id: 0000000000000000000000000000000000000000 /\" >\"$2\".actual >\"$act\" &&\n \ttest_cmp $exp $act &&\n \trm $exp $act\n }\n \n create_gitattributes () {\n \tattr=$1\n+\tident=$2\n+\tcase \"$2\" in\n+\t\t\"\")\n+\t\t\t>.gitattributes\n+\t\t\t;;\n+\t\ti)\n+\t\t\techo \"* ident\" >.gitattributes\n+\t\t\t;;\n+\t\t*)\n+\t\t\techo >&2 invalid ident: $2\n+\t\t\texit 1\n+\tesac\n+\t\t \n \tcase \"$attr\" in\n \t\tauto)\n-\t\techo \"*.txt text=auto\" >.gitattributes\n+\t\techo \"*.txt text=auto\" >>.gitattributes\n \t\t;;\n \t\ttext)\n-\t\techo \"*.txt text\" >.gitattributes\n+\t\techo \"*.txt text\" >>.gitattributes\n \t\t;;\n \t\t-text)\n-\t\techo \"*.txt -text\" >.gitattributes\n+\t\techo \"*.txt -text\" >>.gitattributes\n \t\t;;\n \t\tcrlf)\n-\t\techo \"*.txt eol=crlf\" >.gitattributes\n+\t\techo \"*.txt eol=crlf\" >>.gitattributes\n \t\t;;\n \t\tlf)\n-\t\techo \"*.txt eol=lf\" >.gitattributes\n+\t\techo \"*.txt eol=lf\" >>.gitattributes\n \t\t;;\n \t\t\"\")\n-\t\techo >.gitattributes\n+\t\t#echo >.gitattributes\n \t\t;;\n \t\t*)\n \t\techo >&2 invalid attribute: $attr\n@@ -90,7 +104,7 @@ commit_check_warn () {\n \tlfmixcr=$6\n \tcrlfnul=$7\n \tpfx=crlf_${crlf}_attr_${attr}\n-\tcreate_gitattributes \"$attr\" &&\n+\tcreate_gitattributes \"$attr\" \"\" &&\n \tfor f in LF CRLF LF_mix_CR CRLF_mix_LF LF_nul CRLF_nul\n \tdo\n \t\tfname=${pfx}_$f.txt &&\n@@ -115,7 +129,7 @@ commit_chk_wrnNNO () {\n \tcrlfnul=$7\n \tpfx=NNO_${crlf}_attr_${attr}\n \t#Commit files on top of existing file\n-\tcreate_gitattributes \"$attr\" &&\n+\tcreate_gitattributes \"$attr\" \"\" &&\n \tfor f in LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul\n \tdo\n \t\tfname=${pfx}_$f.txt &&\n@@ -208,28 +222,30 @@ check_in_repo_NNO () {\n }\n \n checkout_files () {\n-\teol=$1\n-\tcrlf=$2\n-\tattr=$3\n-\tlfname=$4\n-\tcrlfname=$5\n-\tlfmixcrlf=$6\n-\tlfmixcr=$7\n-\tcrlfnul=$8\n-\tcreate_gitattributes $attr &&\n+\tattr=$1 ; shift\n+\tident=$1; shift\n+\taeol=$1 ; shift\n+\tcrlf=$1 ; shift\n+\tceol=$1 ; shift\n+\tlfname=$1 ; shift\n+\tcrlfname=$1 ; shift\n+\tlfmixcrlf=$1 ; shift\n+\tlfmixcr=$1 ; shift\n+\tcrlfnul=$1 ; shift\n+\tcreate_gitattributes \"$attr\" \"$ident\" &&\n \tgit config core.autocrlf $crlf &&\n-\tpfx=eol_${eol}_crlf_${crlf}_attr_${attr}_ &&\n+\tpfx=eol_${ceol}_crlf_${crlf}_attr_${attr}_ &&\n \tfor f in LF CRLF LF_mix_CR CRLF_mix_LF LF_nul\n \tdo\n \t\trm crlf_false_attr__$f.txt &&\n-\t\tif test -z \"$eol\"; then\n+\t\tif test -z \"$ceol\"; then\n \t\t\tgit checkout crlf_false_attr__$f.txt\n \t\telse\n-\t\t\tgit -c core.eol=$eol checkout crlf_false_attr__$f.txt\n+\t\t\tgit -c core.eol=$ceol checkout crlf_false_attr__$f.txt\n \t\tfi\n \tdone\n \n-\ttest_expect_success \"ls-files --eol $lfname ${pfx}LF.txt\" '\n+\ttest_expect_success \"ls-files --eol i=$ident attributes=$attr $aeol core.autocrlf=$crlf core.eol=$ceol\" '\n \t\ttest_when_finished \"rm expect actual\" &&\n \t\tsort <<-EOF >expect &&\n \t\ti/crlf w/$(stats_ascii $crlfname) crlf_false_attr__CRLF.txt\n@@ -244,19 +260,19 @@ checkout_files () {\n \t\tsort >actual &&\n \t\ttest_cmp expect actual\n \t'\n-\ttest_expect_success \"checkout core.eol=$eol core.autocrlf=$crlf gitattributes=$attr file=LF\" \"\n+\ttest_expect_success \"checkout i=$ident attributes=$attr $aeol core.autocrlf=$crlf core.eol=$ceol file=LF\" \"\n \t\tcompare_ws_file $pfx $lfname    crlf_false_attr__LF.txt\n \t\"\n-\ttest_expect_success \"checkout core.eol=$eol core.autocrlf=$crlf gitattributes=$attr file=CRLF\" \"\n+\ttest_expect_success \"checkout i=$ident attributes=$attr $aeol core.autocrlf=$crlf core.eol=$ceol file=CRLF\" \"\n \t\tcompare_ws_file $pfx $crlfname  crlf_false_attr__CRLF.txt\n \t\"\n-\ttest_expect_success \"checkout core.eol=$eol core.autocrlf=$crlf gitattributes=$attr file=CRLF_mix_LF\" \"\n+\ttest_expect_success \"checkout i=$ident attributes=$attr $aeol core.autocrlf=$crlf core.eol=$ceol file=CRLF_mix_LF\" \"\n \t\tcompare_ws_file $pfx $lfmixcrlf crlf_false_attr__CRLF_mix_LF.txt\n \t\"\n-\ttest_expect_success \"checkout core.eol=$eol core.autocrlf=$crlf gitattributes=$attr file=LF_mix_CR\" \"\n+\ttest_expect_success \"checkout i=$ident attributes=$attr $aeol core.autocrlf=$crlf core.eol=$ceol file=LF_mix_CR\" \"\n \t\tcompare_ws_file $pfx $lfmixcr   crlf_false_attr__LF_mix_CR.txt\n \t\"\n-\ttest_expect_success \"checkout core.eol=$eol core.autocrlf=$crlf gitattributes=$attr file=LF_nul\" \"\n+\ttest_expect_success \"checkout i=$ident attributes=$attr $aeol core.autocrlf=$crlf core.eol=$ceol file=LF_nul\" \"\n \t\tcompare_ws_file $pfx $crlfnul   crlf_false_attr__LF_nul.txt\n \t\"\n }\n@@ -301,14 +317,13 @@ test_expect_success 'setup master' '\n \tgit checkout -b master &&\n \tgit add .gitattributes &&\n \tgit commit -m \"add .gitattributes\" \"\" &&\n-\tprintf \"line1\\nline2\\nline3\"     >LF &&\n-\tprintf \"line1\\r\\nline2\\r\\nline3\" >CRLF &&\n-\tprintf \"line1\\r\\nline2\\nline3\"   >repoMIX &&\n-\tprintf \"line1\\r\\nline2\\nline3\"   >CRLF_mix_LF &&\n-\tprintf \"line1\\nline2\\rline3\"     >LF_mix_CR &&\n-\tprintf \"line1\\r\\nline2\\rline3\"   >CRLF_mix_CR &&\n-\tprintf \"line1Q\\r\\nline2\\r\\nline3\" | q_to_nul >CRLF_nul &&\n-\tprintf \"line1Q\\nline2\\nline3\" | q_to_nul >LF_nul &&\n+\tprintf \"\\$Id: 0000000000000000000000000000000000000000 \\$\\nline1\\nline2\\nline3\"     >LF &&\n+\tprintf \"\\$Id: 0000000000000000000000000000000000000000 \\$\\r\\nline1\\r\\nline2\\r\\nline3\" >CRLF &&\n+\tprintf \"\\$Id: 0000000000000000000000000000000000000000 \\$\\nline1\\r\\nline2\\nline3\"   >CRLF_mix_LF &&\n+\tprintf \"\\$Id: 0000000000000000000000000000000000000000 \\$\\nline1\\nline2\\rline3\"     >LF_mix_CR &&\n+\tprintf \"\\$Id: 0000000000000000000000000000000000000000 \\$\\r\\nline1\\r\\nline2\\rline3\"   >CRLF_mix_CR &&\n+\tprintf \"\\$Id: 0000000000000000000000000000000000000000 \\$\\r\\nline1Q\\r\\nline2\\r\\nline3\" | q_to_nul >CRLF_nul &&\n+\tprintf \"\\$Id: 0000000000000000000000000000000000000000 \\$\\nline1Q\\nline2\\nline3\" | q_to_nul >LF_nul &&\n \tcreate_NNO_files CRLF_mix_LF CRLF_mix_LF CRLF_mix_LF CRLF_mix_LF CRLF_mix_LF &&\n \tgit -c core.autocrlf=false add NNO_*.txt &&\n \tgit commit -m \"mixed line endings\" &&\n@@ -449,23 +464,18 @@ check_in_repo_NNO input \"-text\" LF        CRLF      CRLF_mix_LF  LF_mix_CR \tCRLF\n # How to read the table below:\n # - checkout_files will check multiple files with a combination of settings\n #   and attributes (core.autocrlf=input is forbidden with core.eol=crlf)\n-# - parameter $1 : core.eol               lf | crlf\n-# - parameter $2 : core.autocrlf          false | true | input\n-# - parameter $3 : text in .gitattributs  \"\" (empty) | auto | text | -text\n-# - parameter $4 : reference for a file with only LF in the repo\n-# - parameter $5 : reference for a file with only CRLF in the repo\n-# - parameter $6 : reference for a file with mixed LF and CRLF in the repo\n-# - parameter $7 : reference for a file with LF and CR in the repo (does somebody uses this ?)\n-# - parameter $8 : reference for a file with CRLF and a NUL (should be handled as binary when auto)\n-\n-#                                            What we have in the repo:\n-#                                            ----------------- EOL in repo ----------------\n-#                                            LF    CRLF  CRLF_mix_LF  LF_mix_CR    CRLF_nul\n-#                   settings with checkout:\n-#                   core.   core.   .gitattr\n-#                    eol     acrlf\n-#                                            ----------------------------------------------\n-#                                            What we want to have in the working tree:\n+#\n+# - parameter $1 \t: text in .gitattributs  \"\" (empty) | auto | text | -text\n+# - parameter $2 \t: ident                  \"\" | i (i == ident)\n+# - parameter $3 \t: eol in .gitattributs   \"\" (empty) | lf | crlf\n+# - parameter $4 \t: core.autocrlf          false | true | input\n+# - parameter $5 \t: core.eol               \"\" | lf | crlf | \"native\"\n+# - parameter $6 \t: reference for a file with only LF in the repo\n+# - parameter $7 \t: reference for a file with only CRLF in the repo\n+# - parameter $8 \t: reference for a file with mixed LF and CRLF in the repo\n+# - parameter $9 \t: reference for a file with LF and CR in the repo\n+# - parameter $10 : reference for a file with CRLF and a NUL (should be handled as binary when auto)\n+\n if test_have_prereq NATIVE_CRLF\n then\n MIX_CRLF_LF=CRLF\n@@ -480,69 +490,90 @@ LFNUL=LF_nul\n fi\n export CRLF_MIX_LF_CR MIX NL\n \n-checkout_files    lf      false  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    lf      true   \"\"       CRLF  CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    lf      input  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    lf      false \"auto\"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    lf      true  \"auto\"    CRLF  CRLF  CRLF         LF_mix_CR    LF_nul\n-checkout_files    lf      input \"auto\"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    lf      false \"text\"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    lf      true  \"text\"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n-checkout_files    lf      input \"text\"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    lf      false \"-text\"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    lf      true  \"-text\"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    lf      input \"-text\"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    lf      false \"lf\"      LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    lf      true  \"lf\"      LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    lf      input \"lf\"      LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    lf      false \"crlf\"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n-checkout_files    lf      true  \"crlf\"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n-checkout_files    lf      input \"crlf\"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n-\n-checkout_files    crlf    false  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    crlf    true   \"\"       CRLF  CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    crlf    false \"auto\"    CRLF  CRLF  CRLF         LF_mix_CR    LF_nul\n-checkout_files    crlf    true  \"auto\"    CRLF  CRLF  CRLF         LF_mix_CR    LF_nul\n-checkout_files    crlf    false \"text\"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n-checkout_files    crlf    true  \"text\"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n-checkout_files    crlf    false \"-text\"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    crlf    true  \"-text\"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    crlf    false \"lf\"      LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    crlf    true  \"lf\"      LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    crlf    false \"crlf\"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n-checkout_files    crlf    true  \"crlf\"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n-\n-checkout_files    \"\"      false  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    \"\"      true   \"\"       CRLF  CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    \"\"      input  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    \"\"      false \"auto\"    $NL   CRLF  $MIX_CRLF_LF LF_mix_CR    LF_nul\n-checkout_files    \"\"      true  \"auto\"    CRLF  CRLF  CRLF         LF_mix_CR    LF_nul\n-checkout_files    \"\"      input \"auto\"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    \"\"      false \"text\"    $NL   CRLF  $MIX_CRLF_LF $MIX_LF_CR   $LFNUL\n-checkout_files    \"\"      true  \"text\"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n-checkout_files    \"\"      input \"text\"    LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    \"\"      false \"-text\"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    \"\"      true  \"-text\"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    \"\"      input \"-text\"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    \"\"      false \"lf\"      LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    \"\"      true  \"lf\"      LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    \"\"      input \"lf\"      LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    \"\"      false \"crlf\"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n-checkout_files    \"\"      true  \"crlf\"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n-checkout_files    \"\"      input \"crlf\"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n-\n-checkout_files    native  false  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    native  true   \"\"       CRLF  CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    native  false \"auto\"    $NL   CRLF  $MIX_CRLF_LF LF_mix_CR    LF_nul\n-checkout_files    native  true  \"auto\"    CRLF  CRLF  CRLF         LF_mix_CR    LF_nul\n-checkout_files    native  false \"text\"    $NL   CRLF  $MIX_CRLF_LF $MIX_LF_CR   $LFNUL\n-checkout_files    native  true  \"text\"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n-checkout_files    native  false \"-text\"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    native  true  \"-text\"   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    native  false \"lf\"      LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    native  true  \"lf\"      LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n-checkout_files    native  false \"crlf\"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n-checkout_files    native  true  \"crlf\"    CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+checkout_files \"\"      \"\" \"\"    false  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      \"\" \"\"    false  crlf     LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      \"\" \"\"    false  lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      \"\" \"\"    false  native   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      \"\" \"\"    input  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      \"\" \"\"    input  lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      \"\" \"\"    true   \"\"       CRLF  CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      \"\" \"\"    true   crlf     CRLF  CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      \"\" \"\"    true   lf       CRLF  CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      \"\" \"\"    true   native   CRLF  CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      i  \"\"    false  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      i  \"\"    false  crlf     LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      i  \"\"    false  lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      i  \"\"    false  native   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      i  \"\"    input  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      i  \"\"    input  lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      i  \"\"    true   \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      i  \"\"    true   crlf     LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      i  \"\"    true   lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"\"      i  \"\"    true   native   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"auto\"  \"\" \"\"    false  \"\"       $NL   CRLF  $MIX_CRLF_LF LF_mix_CR    LF_nul\n+checkout_files \"auto\"  \"\" \"\"    false  crlf     CRLF  CRLF  CRLF         LF_mix_CR    LF_nul\n+checkout_files \"auto\"  \"\" \"\"    false  lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"auto\"  \"\" \"\"    false  native   $NL   CRLF  $MIX_CRLF_LF LF_mix_CR    LF_nul\n+checkout_files \"auto\"  \"\" \"\"    input  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"auto\"  \"\" \"\"    input  lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"auto\"  \"\" \"\"    true   \"\"       CRLF  CRLF  CRLF         LF_mix_CR    LF_nul\n+checkout_files \"auto\"  \"\" \"\"    true   crlf     CRLF  CRLF  CRLF         LF_mix_CR    LF_nul\n+checkout_files \"auto\"  \"\" \"\"    true   lf       CRLF  CRLF  CRLF         LF_mix_CR    LF_nul\n+checkout_files \"auto\"  \"\" \"\"    true   native   CRLF  CRLF  CRLF         LF_mix_CR    LF_nul\n+checkout_files \"auto\"  i  \"\"    false  \"\"       $NL   CRLF  $MIX_CRLF_LF LF_mix_CR    LF_nul\n+checkout_files \"auto\"  i  \"\"    false  crlf     LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"auto\"  i  \"\"    false  lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"auto\"  i  \"\"    false  native   $NL   CRLF  $MIX_CRLF_LF LF_mix_CR    LF_nul\n+checkout_files \"auto\"  i  \"\"    input  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"auto\"  i  \"\"    input  lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"auto\"  i  \"\"    true   \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"auto\"  i  \"\"    true   crlf     LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"auto\"  i  \"\"    true   lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+checkout_files \"auto\"  i  \"\"    true   native   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\n+for id in \"\" i;\n+do\n+\tcheckout_files \"crlf\"  \"$id\" \"\"    false  \"\"       CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+\tcheckout_files \"crlf\"  \"$id\" \"\"    false  crlf     CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+\tcheckout_files \"crlf\"  \"$id\" \"\"    false  lf       CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+\tcheckout_files \"crlf\"  \"$id\" \"\"    false  native   CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+\tcheckout_files \"crlf\"  \"$id\" \"\"    input  \"\"       CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+\tcheckout_files \"crlf\"  \"$id\" \"\"    input  lf       CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+\tcheckout_files \"crlf\"  \"$id\" \"\"    true   \"\"       CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+\tcheckout_files \"crlf\"  \"$id\" \"\"    true   crlf     CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+\tcheckout_files \"crlf\"  \"$id\" \"\"    true   lf       CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+\tcheckout_files \"crlf\"  \"$id\" \"\"    true   native   CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+\tcheckout_files \"lf\"    \"$id\" \"\"    false  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"lf\"    \"$id\" \"\"    false  crlf     LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"lf\"    \"$id\" \"\"    false  lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"lf\"    \"$id\" \"\"    false  native   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"lf\"    \"$id\" \"\"    input  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"lf\"    \"$id\" \"\"    input  lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"lf\"    \"$id\" \"\"    true   \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"lf\"    \"$id\" \"\"    true   crlf     LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"lf\"    \"$id\" \"\"    true   lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"lf\"    \"$id\" \"\"    true   native   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"text\"  \"$id\" \"\"    false  \"\"       $NL   CRLF  $MIX_CRLF_LF $MIX_LF_CR   $LFNUL\n+\tcheckout_files \"text\"  \"$id\" \"\"    false  crlf     CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+\tcheckout_files \"text\"  \"$id\" \"\"    false  lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"text\"  \"$id\" \"\"    false  native   $NL   CRLF  $MIX_CRLF_LF $MIX_LF_CR   $LFNUL\n+\tcheckout_files \"text\"  \"$id\" \"\"    input  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"text\"  \"$id\" \"\"    input  lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"text\"  \"$id\" \"\"    true   \"\"       CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+\tcheckout_files \"text\"  \"$id\" \"\"    true   crlf     CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+\tcheckout_files \"text\"  \"$id\" \"\"    true   lf       CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+\tcheckout_files \"text\"  \"$id\" \"\"    true   native   CRLF  CRLF  CRLF         CRLF_mix_CR  CRLF_nul\n+\tcheckout_files \"-text\" \"$id\" \"\"    false  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"-text\" \"$id\" \"\"    false  crlf     LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"-text\" \"$id\" \"\"    false  lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"-text\" \"$id\" \"\"    false  native   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"-text\" \"$id\" \"\"    input  \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"-text\" \"$id\" \"\"    input  lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"-text\" \"$id\" \"\"    true   \"\"       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"-text\" \"$id\" \"\"    true   crlf     LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"-text\" \"$id\" \"\"    true   lf       LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+\tcheckout_files \"-text\" \"$id\" \"\"    true   native   LF    CRLF  CRLF_mix_LF  LF_mix_CR    LF_nul\n+done\n \n # Should be the last test case: remove some files from the worktree\n test_expect_success 'ls-files --eol -d -z' '\n-- \n2.1.4\n"},{"id":"276613","messageId":"CAPig+cTjLFFa+1mz222pKhoCjMbPwJwPSy1nWCfOd2SdKX1x-A@mail.gmail.com","threadId":"41249","inReplyTo":"1453558101-6858-1-git-send-email-tboegi@web.de","subject":"Re: [PATCH v1] t0027: Add tests for get_stream_filter()","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2016-01-23T23:29:41Z","receivedAt":"2016-01-23T23:29:41Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Saturday, January 23, 2016, <tboegi@web.de> wrote:\n> When a filter is configured, a different code-path is used in\n> convert.c and entry.c via get_stream_filter(), but there are no test cases yet.\n>\n> Add tests for the filter API by configuring the ident filter.\n> The result of the SHA1 conversion is not checked, this is already\n> done in other TC.\n>\n> Add a paramter to checkout_files() in t0027.\n\ns/paramter/parameter/\n\n> While changing the signature, add another parameter for the eol= attribute.\n> This is currently unused,\n> tests for e.g. \"* text=auto eol=lf\" will be added in a separate commit.\n> ---\n\nMissing sign-off.\n\n>  t/t0027-auto-crlf.sh | 261 ++++++++++++++++++++++++++++-----------------------\n>  1 file changed, 146 insertions(+), 115 deletions(-)\n"}]}