rebase: use correct base for --keep-base when a branch is given
[alt-git.git] / t / t4258-am-quoted-cr.sh
blob201915b45a8bd67c2fc744c259b5a2ee24138796
1 #!/bin/sh
3 test_description='test am --quoted-cr=<action>'
5 . ./test-lib.sh
7 DATA="$TEST_DIRECTORY/t4258"
9 test_expect_success 'setup' '
10 test_write_lines one two three >text &&
11 test_commit one text &&
12 test_write_lines one owt three >text &&
13 test_commit two text
16 test_expect_success 'am warn if quoted-cr is found' '
17 git reset --hard one &&
18 test_must_fail git am "$DATA/mbox" 2>err &&
19 grep "quoted CRLF detected" err
22 test_expect_success 'am --quoted-cr=strip' '
23 test_might_fail git am --abort &&
24 git reset --hard one &&
25 git am --quoted-cr=strip "$DATA/mbox" &&
26 git diff --exit-code HEAD two
29 test_expect_success 'am with config mailinfo.quotedCr=strip' '
30 test_might_fail git am --abort &&
31 git reset --hard one &&
32 test_config mailinfo.quotedCr strip &&
33 git am "$DATA/mbox" &&
34 git diff --exit-code HEAD two
37 test_done