3 test_description
='test am --quoted-cr=<action>'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 DATA
="$TEST_DIRECTORY/t4258"
10 test_expect_success
'setup' '
11 test_write_lines one two three >text &&
12 test_commit one text &&
13 test_write_lines one owt three >text &&
17 test_expect_success
'am warn if quoted-cr is found' '
18 git reset --hard one &&
19 test_must_fail git am "$DATA/mbox" 2>err &&
20 grep "quoted CRLF detected" err
23 test_expect_success
'am --quoted-cr=strip' '
24 test_might_fail git am --abort &&
25 git reset --hard one &&
26 git am --quoted-cr=strip "$DATA/mbox" &&
27 git diff --exit-code HEAD two
30 test_expect_success
'am with config mailinfo.quotedCr=strip' '
31 test_might_fail git am --abort &&
32 git reset --hard one &&
33 test_config mailinfo.quotedCr strip &&
34 git am "$DATA/mbox" &&
35 git diff --exit-code HEAD two