@@ -55,17 +55,11 @@ create_gitattributes () {
55
55
esac
56
56
}
57
57
58
- # Some warnings depend on the native end-of-line marker
59
-
60
- test_have_prereq NATIVE_CRLF &&
61
- NATIVE_CRLF=t ||
62
- NATIVE_CRLF=
63
-
64
58
check_warning () {
65
- case " $1 , $NATIVE_CRLF " in
66
- LF_CRLF, * |MAYBE_CRLF,t|MIX,t ) grep " LF will be replaced by CRLF" $2 ;;
67
- CRLF_LF, * |MAYBE_LF,|MIX, ) grep " CRLF will be replaced by LF" $2 ;;
68
- , * |MAYBE_CRLF,|MAYBE_LF,t )
59
+ case " $1 " in
60
+ LF_CRLF) grep " LF will be replaced by CRLF" $2 ;;
61
+ CRLF_LF) grep " CRLF will be replaced by LF" $2 ;;
62
+ ' ' )
69
63
> expect
70
64
grep " will be replaced by" $2 > actual
71
65
test_cmp expect actual
@@ -181,17 +175,16 @@ test_expect_success 'add files empty attr' '
181
175
create_file_in_repo input "" "" "CRLF_LF" "CRLF_LF" "" ""
182
176
'
183
177
184
-
185
178
test_expect_success ' add files attr=auto' '
186
- create_file_in_repo false "auto" "MAYBE_CRLF" "MAYBE_LF" "MIX" "" "" &&
187
- create_file_in_repo true "auto" "LF_CRLF" "" "LF_CRLF" "" "" &&
188
- create_file_in_repo input "auto" "" "CRLF_LF" "CRLF_LF" "" ""
179
+ create_file_in_repo false "auto" "" "CRLF_LF" "CRLF_LF" "" "" &&
180
+ create_file_in_repo true "auto" "LF_CRLF" "" "LF_CRLF" "" "" &&
181
+ create_file_in_repo input "auto" "" "CRLF_LF" "CRLF_LF" "" ""
189
182
'
190
183
191
184
test_expect_success ' add files attr=text' '
192
- create_file_in_repo false "text" "MAYBE_CRLF" "MAYBE_LF " "MIX" "MAYBE_CRLF" "MAYBE_LF " &&
193
- create_file_in_repo true "text" "LF_CRLF" "" "LF_CRLF" "LF_CRLF" "" &&
194
- create_file_in_repo input "text" "" "CRLF_LF" "CRLF_LF" "" "CRLF_LF"
185
+ create_file_in_repo false "text" "" "CRLF_LF " "CRLF_LF" "" "CRLF_LF " &&
186
+ create_file_in_repo true "text" "LF_CRLF" "" "LF_CRLF" "LF_CRLF" "" &&
187
+ create_file_in_repo input "text" "" "CRLF_LF" "CRLF_LF" "" "CRLF_LF"
195
188
'
196
189
197
190
test_expect_success ' add files attr=-text' '
0 commit comments