diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 13:34:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 13:34:27 +0000 |
commit | 4dbdc42d9e7c3968ff7f690d00680419c9b8cb0f (patch) | |
tree | 47c1d492e9c956c1cd2b74dbd3b9d8b0db44dc4e /t/t4258-am-quoted-cr.sh | |
parent | Initial commit. (diff) | |
download | git-4dbdc42d9e7c3968ff7f690d00680419c9b8cb0f.tar.xz git-4dbdc42d9e7c3968ff7f690d00680419c9b8cb0f.zip |
Adding upstream version 1:2.43.0.upstream/1%2.43.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | t/t4258-am-quoted-cr.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/t/t4258-am-quoted-cr.sh b/t/t4258-am-quoted-cr.sh new file mode 100755 index 0000000..201915b --- /dev/null +++ b/t/t4258-am-quoted-cr.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +test_description='test am --quoted-cr=<action>' + +. ./test-lib.sh + +DATA="$TEST_DIRECTORY/t4258" + +test_expect_success 'setup' ' + test_write_lines one two three >text && + test_commit one text && + test_write_lines one owt three >text && + test_commit two text +' + +test_expect_success 'am warn if quoted-cr is found' ' + git reset --hard one && + test_must_fail git am "$DATA/mbox" 2>err && + grep "quoted CRLF detected" err +' + +test_expect_success 'am --quoted-cr=strip' ' + test_might_fail git am --abort && + git reset --hard one && + git am --quoted-cr=strip "$DATA/mbox" && + git diff --exit-code HEAD two +' + +test_expect_success 'am with config mailinfo.quotedCr=strip' ' + test_might_fail git am --abort && + git reset --hard one && + test_config mailinfo.quotedCr strip && + git am "$DATA/mbox" && + git diff --exit-code HEAD two +' + +test_done |