t0027: add tests for get_stream_filter()
When a filter is configured, a different code-path is used in convert.c and entry.c via get_stream_filter(), but there are no test cases yet. Add tests for the filter API by configuring the ident filter. The result of the SHA1 conversion is not checked, this is already done in other TC. Add a parameter to checkout_files() in t0027. While changing the signature, add another parameter for the eol= attribute. This is currently unused, tests for e.g. "* text=auto eol=lf" will be added in a separate commit. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Torsten Bögershausen committed
Feb 5, 2016 at 17:13 UTC
320d39cdb075896804868cc8b1ca834a04ffdd8f
1 file changed
+146
-135
t/t0027-auto-crlf.sh
+146
-135
@@ -21,38 +21,32 @@ compare_ws_file () {
21
pfx=$1
22
exp=$2.expect
23
act=$pfx.actual.$3
24
- tr '\015\000' QN <"$2" >"$exp" &&
25
- tr '\015\000' QN <"$3" >"$act" &&
26
- test_cmp $exp $act &&
27
- rm $exp $act
24
+ tr '\015\000abcdef0123456789' QN00000000000000000 <"$2" >"$exp" &&
25
+ tr '\015\000abcdef0123456789' QN00000000000000000 <"$3" >"$act" &&
26
+ test_cmp "$exp" "$act" &&
27
+ rm "$exp" "$act"
28
}
29
30
create_gitattributes () {
31
- attr=$1
32
- case "$attr" in
33
- auto)
34
- echo "*.txt text=auto" >.gitattributes
35
- ;;
36
- text)
37
- echo "*.txt text" >.gitattributes
38
- ;;
39
- -text)
40
- echo "*.txt -text" >.gitattributes
41
- ;;
42
- crlf)
43
- echo "*.txt eol=crlf" >.gitattributes
44
- ;;
45
- lf)
46
- echo "*.txt eol=lf" >.gitattributes
47
- ;;
48
- "")
49
- echo >.gitattributes
50
- ;;
51
- *)
52
- echo >&2 invalid attribute: $attr
53
- exit 1
54
- ;;
55
- esac
31
+ {
32
+ while test "$#" != 0
33
+ do
34
+ case "$1" in
35
+ auto) echo '*.txt text=auto' ;;
36
+ ident) echo '*.txt ident' ;;
37
+ text) echo '*.txt text' ;;
38
+ -text) echo '*.txt -text' ;;
39
+ crlf) echo '*.txt eol=crlf' ;;
40
+ lf) echo '*.txt eol=lf' ;;
41
+ "") ;;
42
+ *)
43
+ echo >&2 invalid attribute: "$1"
44
+ exit 1
45
+ ;;
46
+ esac &&
47
+ shift
48
+ done
49
+ } >.gitattributes
50
}
51
52
create_NNO_files () {
@@ -208,28 +202,30 @@ check_in_repo_NNO () {
202
}
203
204
checkout_files () {
211
- eol=$1
212
- crlf=$2
213
- attr=$3
214
- lfname=$4
215
- crlfname=$5
216
- lfmixcrlf=$6
217
- lfmixcr=$7
218
- crlfnul=$8
219
- create_gitattributes $attr &&
205
+ attr=$1 ; shift
206
+ ident=$1; shift
207
+ aeol=$1 ; shift
208
+ crlf=$1 ; shift
209
+ ceol=$1 ; shift
210
+ lfname=$1 ; shift
211
+ crlfname=$1 ; shift
212
+ lfmixcrlf=$1 ; shift
213
+ lfmixcr=$1 ; shift
214
+ crlfnul=$1 ; shift
215
+ create_gitattributes "$attr" "$ident" &&
216
git config core.autocrlf $crlf &&
221
- pfx=eol_${eol}_crlf_${crlf}_attr_${attr}_ &&
217
+ pfx=eol_${ceol}_crlf_${crlf}_attr_${attr}_ &&
218
for f in LF CRLF LF_mix_CR CRLF_mix_LF LF_nul
219
do
220
rm crlf_false_attr__$f.txt &&
225
- if test -z "$eol"; then
221
+ if test -z "$ceol"; then
222
git checkout crlf_false_attr__$f.txt
223
else
228
- git -c core.eol=$eol checkout crlf_false_attr__$f.txt
224
+ git -c core.eol=$ceol checkout crlf_false_attr__$f.txt
225
fi
226
done
227
232
- test_expect_success "ls-files --eol $lfname ${pfx}LF.txt" '
228
+ test_expect_success "ls-files --eol attr=$attr $ident $aeol core.autocrlf=$crlf core.eol=$ceol" '
229
test_when_finished "rm expect actual" &&
230
sort <<-EOF >expect &&
231
i/crlf w/$(stats_ascii $crlfname) crlf_false_attr__CRLF.txt
@@ -244,19 +240,19 @@ checkout_files () {
240
sort >actual &&
241
test_cmp expect actual
242
'
247
- test_expect_success "checkout core.eol=$eol core.autocrlf=$crlf gitattributes=$attr file=LF" "
243
+ test_expect_success "checkout $ident $attr $aeol core.autocrlf=$crlf core.eol=$ceol file=LF" "
244
compare_ws_file $pfx $lfname crlf_false_attr__LF.txt
245
"
250
- test_expect_success "checkout core.eol=$eol core.autocrlf=$crlf gitattributes=$attr file=CRLF" "
246
+ test_expect_success "checkout $ident $attr $aeol core.autocrlf=$crlf core.eol=$ceol file=CRLF" "
247
compare_ws_file $pfx $crlfname crlf_false_attr__CRLF.txt
248
"
253
- test_expect_success "checkout core.eol=$eol core.autocrlf=$crlf gitattributes=$attr file=CRLF_mix_LF" "
249
+ test_expect_success "checkout $ident $attr $aeol core.autocrlf=$crlf core.eol=$ceol file=CRLF_mix_LF" "
250
compare_ws_file $pfx $lfmixcrlf crlf_false_attr__CRLF_mix_LF.txt
251
"
256
- test_expect_success "checkout core.eol=$eol core.autocrlf=$crlf gitattributes=$attr file=LF_mix_CR" "
252
+ test_expect_success "checkout $ident $attr $aeol core.autocrlf=$crlf core.eol=$ceol file=LF_mix_CR" "
253
compare_ws_file $pfx $lfmixcr crlf_false_attr__LF_mix_CR.txt
254
"
259
- test_expect_success "checkout core.eol=$eol core.autocrlf=$crlf gitattributes=$attr file=LF_nul" "
255
+ test_expect_success "checkout $ident $attr $aeol core.autocrlf=$crlf core.eol=$ceol file=LF_nul" "
256
compare_ws_file $pfx $crlfnul crlf_false_attr__LF_nul.txt
257
"
258
}
@@ -301,14 +297,13 @@ test_expect_success 'setup master' '
297
git checkout -b master &&
298
git add .gitattributes &&
299
git commit -m "add .gitattributes" "" &&
304
- printf "line1\nline2\nline3" >LF &&
305
- printf "line1\r\nline2\r\nline3" >CRLF &&
306
- printf "line1\r\nline2\nline3" >repoMIX &&
307
- printf "line1\r\nline2\nline3" >CRLF_mix_LF &&
308
- printf "line1\nline2\rline3" >LF_mix_CR &&
309
- printf "line1\r\nline2\rline3" >CRLF_mix_CR &&
310
- printf "line1Q\r\nline2\r\nline3" | q_to_nul >CRLF_nul &&
311
- printf "line1Q\nline2\nline3" | q_to_nul >LF_nul &&
300
+ printf "\$Id: 0000000000000000000000000000000000000000 \$\nLINEONE\nLINETWO\nLINETHREE" >LF &&
301
+ printf "\$Id: 0000000000000000000000000000000000000000 \$\r\nLINEONE\r\nLINETWO\r\nLINETHREE" >CRLF &&
302
+ printf "\$Id: 0000000000000000000000000000000000000000 \$\nLINEONE\r\nLINETWO\nLINETHREE" >CRLF_mix_LF &&
303
+ printf "\$Id: 0000000000000000000000000000000000000000 \$\nLINEONE\nLINETWO\rLINETHREE" >LF_mix_CR &&
304
+ printf "\$Id: 0000000000000000000000000000000000000000 \$\r\nLINEONE\r\nLINETWO\rLINETHREE" >CRLF_mix_CR &&
305
+ printf "\$Id: 0000000000000000000000000000000000000000 \$\r\nLINEONEQ\r\nLINETWO\r\nLINETHREE" | q_to_nul >CRLF_nul &&
306
+ printf "\$Id: 0000000000000000000000000000000000000000 \$\nLINEONEQ\nLINETWO\nLINETHREE" | q_to_nul >LF_nul &&
307
create_NNO_files CRLF_mix_LF CRLF_mix_LF CRLF_mix_LF CRLF_mix_LF CRLF_mix_LF &&
308
git -c core.autocrlf=false add NNO_*.txt &&
309
git commit -m "mixed line endings" &&
@@ -449,23 +444,18 @@ check_in_repo_NNO input "-text" LF CRLF CRLF_mix_LF LF_mix_CR CRLF
444
# How to read the table below:
445
# - checkout_files will check multiple files with a combination of settings
446
# and attributes (core.autocrlf=input is forbidden with core.eol=crlf)
452
-# - parameter $1 : core.eol lf | crlf
453
-# - parameter $2 : core.autocrlf false | true | input
454
-# - parameter $3 : text in .gitattributs "" (empty) | auto | text | -text
455
-# - parameter $4 : reference for a file with only LF in the repo
456
-# - parameter $5 : reference for a file with only CRLF in the repo
457
-# - parameter $6 : reference for a file with mixed LF and CRLF in the repo
458
-# - parameter $7 : reference for a file with LF and CR in the repo (does somebody uses this ?)
459
-# - parameter $8 : reference for a file with CRLF and a NUL (should be handled as binary when auto)
460
-
461
-# What we have in the repo:
462
-# ----------------- EOL in repo ----------------
463
-# LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
464
-# settings with checkout:
465
-# core. core. .gitattr
466
-# eol acrlf
467
-# ----------------------------------------------
468
-# What we want to have in the working tree:
447
+#
448
+# - parameter $1 : text in .gitattributs "" (empty) | auto | text | -text
449
+# - parameter $2 : ident "" | i (i == ident)
450
+# - parameter $3 : eol in .gitattributs "" (empty) | lf | crlf
451
+# - parameter $4 : core.autocrlf false | true | input
452
+# - parameter $5 : core.eol "" | lf | crlf | "native"
453
+# - parameter $6 : reference for a file with only LF in the repo
454
+# - parameter $7 : reference for a file with only CRLF in the repo
455
+# - parameter $8 : reference for a file with mixed LF and CRLF in the repo
456
+# - parameter $9 : reference for a file with LF and CR in the repo
457
+# - parameter $10 : reference for a file with CRLF and a NUL (should be handled as binary when auto)
458
+
459
if test_have_prereq NATIVE_CRLF
460
then
461
MIX_CRLF_LF=CRLF
@@ -480,69 +470,90 @@ LFNUL=LF_nul
470
fi
471
export CRLF_MIX_LF_CR MIX NL
472
483
-checkout_files lf false "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
484
-checkout_files lf true "" CRLF CRLF CRLF_mix_LF LF_mix_CR LF_nul
485
-checkout_files lf input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
486
-checkout_files lf false "auto" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
487
-checkout_files lf true "auto" CRLF CRLF CRLF LF_mix_CR LF_nul
488
-checkout_files lf input "auto" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
489
-checkout_files lf false "text" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
490
-checkout_files lf true "text" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
491
-checkout_files lf input "text" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
492
-checkout_files lf false "-text" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
493
-checkout_files lf true "-text" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
494
-checkout_files lf input "-text" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
495
-checkout_files lf false "lf" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
496
-checkout_files lf true "lf" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
497
-checkout_files lf input "lf" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
498
-checkout_files lf false "crlf" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
499
-checkout_files lf true "crlf" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
500
-checkout_files lf input "crlf" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
501
-
502
-checkout_files crlf false "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
503
-checkout_files crlf true "" CRLF CRLF CRLF_mix_LF LF_mix_CR LF_nul
504
-checkout_files crlf false "auto" CRLF CRLF CRLF LF_mix_CR LF_nul
505
-checkout_files crlf true "auto" CRLF CRLF CRLF LF_mix_CR LF_nul
506
-checkout_files crlf false "text" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
507
-checkout_files crlf true "text" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
508
-checkout_files crlf false "-text" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
509
-checkout_files crlf true "-text" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
510
-checkout_files crlf false "lf" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
511
-checkout_files crlf true "lf" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
512
-checkout_files crlf false "crlf" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
513
-checkout_files crlf true "crlf" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
514
-
515
-checkout_files "" false "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
516
-checkout_files "" true "" CRLF CRLF CRLF_mix_LF LF_mix_CR LF_nul
517
-checkout_files "" input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
518
-checkout_files "" false "auto" $NL CRLF $MIX_CRLF_LF LF_mix_CR LF_nul
519
-checkout_files "" true "auto" CRLF CRLF CRLF LF_mix_CR LF_nul
520
-checkout_files "" input "auto" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
521
-checkout_files "" false "text" $NL CRLF $MIX_CRLF_LF $MIX_LF_CR $LFNUL
522
-checkout_files "" true "text" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
523
-checkout_files "" input "text" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
524
-checkout_files "" false "-text" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
525
-checkout_files "" true "-text" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
526
-checkout_files "" input "-text" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
527
-checkout_files "" false "lf" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
528
-checkout_files "" true "lf" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
529
-checkout_files "" input "lf" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
530
-checkout_files "" false "crlf" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
531
-checkout_files "" true "crlf" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
532
-checkout_files "" input "crlf" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
533
-
534
-checkout_files native false "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
535
-checkout_files native true "" CRLF CRLF CRLF_mix_LF LF_mix_CR LF_nul
536
-checkout_files native false "auto" $NL CRLF $MIX_CRLF_LF LF_mix_CR LF_nul
537
-checkout_files native true "auto" CRLF CRLF CRLF LF_mix_CR LF_nul
538
-checkout_files native false "text" $NL CRLF $MIX_CRLF_LF $MIX_LF_CR $LFNUL
539
-checkout_files native true "text" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
540
-checkout_files native false "-text" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
541
-checkout_files native true "-text" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
542
-checkout_files native false "lf" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
543
-checkout_files native true "lf" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
544
-checkout_files native false "crlf" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
545
-checkout_files native true "crlf" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
473
+checkout_files "" "" "" false "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
474
+checkout_files "" "" "" false crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
475
+checkout_files "" "" "" false lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
476
+checkout_files "" "" "" false native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
477
+checkout_files "" "" "" input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
478
+checkout_files "" "" "" input lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
479
+checkout_files "" "" "" true "" CRLF CRLF CRLF_mix_LF LF_mix_CR LF_nul
480
+checkout_files "" "" "" true crlf CRLF CRLF CRLF_mix_LF LF_mix_CR LF_nul
481
+checkout_files "" "" "" true lf CRLF CRLF CRLF_mix_LF LF_mix_CR LF_nul
482
+checkout_files "" "" "" true native CRLF CRLF CRLF_mix_LF LF_mix_CR LF_nul
483
+checkout_files "" ident "" false "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
484
+checkout_files "" ident "" false crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
485
+checkout_files "" ident "" false lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
486
+checkout_files "" ident "" false native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
487
+checkout_files "" ident "" input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
488
+checkout_files "" ident "" input lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
489
+checkout_files "" ident "" true "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
490
+checkout_files "" ident "" true crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
491
+checkout_files "" ident "" true lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
492
+checkout_files "" ident "" true native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
493
+checkout_files "auto" "" "" false "" $NL CRLF $MIX_CRLF_LF LF_mix_CR LF_nul
494
+checkout_files "auto" "" "" false crlf CRLF CRLF CRLF LF_mix_CR LF_nul
495
+checkout_files "auto" "" "" false lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
496
+checkout_files "auto" "" "" false native $NL CRLF $MIX_CRLF_LF LF_mix_CR LF_nul
497
+checkout_files "auto" "" "" input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
498
+checkout_files "auto" "" "" input lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
499
+checkout_files "auto" "" "" true "" CRLF CRLF CRLF LF_mix_CR LF_nul
500
+checkout_files "auto" "" "" true crlf CRLF CRLF CRLF LF_mix_CR LF_nul
501
+checkout_files "auto" "" "" true lf CRLF CRLF CRLF LF_mix_CR LF_nul
502
+checkout_files "auto" "" "" true native CRLF CRLF CRLF LF_mix_CR LF_nul
503
+checkout_files "auto" ident "" false "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
504
+checkout_files "auto" ident "" false crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
505
+checkout_files "auto" ident "" false lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
506
+checkout_files "auto" ident "" false native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
507
+checkout_files "auto" ident "" input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
508
+checkout_files "auto" ident "" input lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
509
+checkout_files "auto" ident "" true "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
510
+checkout_files "auto" ident "" true crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
511
+checkout_files "auto" ident "" true lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
512
+checkout_files "auto" ident "" true native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
513
+
514
+for id in "" ident;
515
+do
516
+ checkout_files "crlf" "$id" "" false "" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
517
+ checkout_files "crlf" "$id" "" false crlf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
518
+ checkout_files "crlf" "$id" "" false lf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
519
+ checkout_files "crlf" "$id" "" false native CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
520
+ checkout_files "crlf" "$id" "" input "" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
521
+ checkout_files "crlf" "$id" "" input lf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
522
+ checkout_files "crlf" "$id" "" true "" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
523
+ checkout_files "crlf" "$id" "" true crlf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
524
+ checkout_files "crlf" "$id" "" true lf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
525
+ checkout_files "crlf" "$id" "" true native CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
526
+ checkout_files "lf" "$id" "" false "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
527
+ checkout_files "lf" "$id" "" false crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
528
+ checkout_files "lf" "$id" "" false lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
529
+ checkout_files "lf" "$id" "" false native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
530
+ checkout_files "lf" "$id" "" input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
531
+ checkout_files "lf" "$id" "" input lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
532
+ checkout_files "lf" "$id" "" true "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
533
+ checkout_files "lf" "$id" "" true crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
534
+ checkout_files "lf" "$id" "" true lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
535
+ checkout_files "lf" "$id" "" true native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
536
+ checkout_files "text" "$id" "" false "" $NL CRLF $MIX_CRLF_LF $MIX_LF_CR $LFNUL
537
+ checkout_files "text" "$id" "" false crlf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
538
+ checkout_files "text" "$id" "" false lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
539
+ checkout_files "text" "$id" "" false native $NL CRLF $MIX_CRLF_LF $MIX_LF_CR $LFNUL
540
+ checkout_files "text" "$id" "" input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
541
+ checkout_files "text" "$id" "" input lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
542
+ checkout_files "text" "$id" "" true "" CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
543
+ checkout_files "text" "$id" "" true crlf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
544
+ checkout_files "text" "$id" "" true lf CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
545
+ checkout_files "text" "$id" "" true native CRLF CRLF CRLF CRLF_mix_CR CRLF_nul
546
+ checkout_files "-text" "$id" "" false "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
547
+ checkout_files "-text" "$id" "" false crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
548
+ checkout_files "-text" "$id" "" false lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
549
+ checkout_files "-text" "$id" "" false native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
550
+ checkout_files "-text" "$id" "" input "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
551
+ checkout_files "-text" "$id" "" input lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
552
+ checkout_files "-text" "$id" "" true "" LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
553
+ checkout_files "-text" "$id" "" true crlf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
554
+ checkout_files "-text" "$id" "" true lf LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
555
+ checkout_files "-text" "$id" "" true native LF CRLF CRLF_mix_LF LF_mix_CR LF_nul
556
+done
557
558
# Should be the last test case: remove some files from the worktree
559
test_expect_success 'ls-files --eol -d -z' '