]> git.ipfire.org Git - thirdparty/git.git/blame - t/t6033-merge-crlf.sh
l10n: fr v2.23.0 round 2
[thirdparty/git.git] / t / t6033-merge-crlf.sh
CommitLineData
eea98284
MSO
1#!/bin/sh
2
eea98284
MSO
3test_description='merge conflict in crlf repo
4
5 b---M
6 / /
7 initial---a
8
9'
10
11. ./test-lib.sh
12
13test_expect_success setup '
14 git config core.autocrlf true &&
15 echo foo | append_cr >file &&
16 git add file &&
17 git commit -m "Initial" &&
18 git tag initial &&
19 git branch side &&
20 echo line from a | append_cr >file &&
21 git commit -m "add line from a" file &&
22 git tag a &&
23 git checkout side &&
24 echo line from b | append_cr >file &&
25 git commit -m "add line from b" file &&
26 git tag b &&
27 git checkout master
28'
29
30test_expect_success 'Check "ours" is CRLF' '
31 git reset --hard initial &&
32 git merge side -s ours &&
33 cat file | remove_cr | append_cr >file.temp &&
34 test_cmp file file.temp
35'
36
249c61a6 37test_expect_success 'Check that conflict file is CRLF' '
eea98284
MSO
38 git reset --hard a &&
39 test_must_fail git merge side &&
40 cat file | remove_cr | append_cr >file.temp &&
41 test_cmp file file.temp
42'
43
44test_done