]>
Commit | Line | Data |
---|---|---|
b9905fed JH |
1 | #!/bin/sh |
2 | ||
3 | test_description='ignore CR in CRLF sequence while computing similiarity' | |
4 | ||
c150064d | 5 | TEST_PASSES_SANITIZE_LEAK=true |
b9905fed JH |
6 | . ./test-lib.sh |
7 | ||
8 | test_expect_success setup ' | |
9 | ||
bfdbee98 | 10 | cat "$TEST_DIRECTORY"/t0022-crlf-rename.sh >sample && |
b9905fed JH |
11 | git add sample && |
12 | ||
13 | test_tick && | |
14 | git commit -m Initial && | |
15 | ||
f4e6dcc3 | 16 | append_cr <"$TEST_DIRECTORY"/t0022-crlf-rename.sh >elpmas && |
b9905fed JH |
17 | git add elpmas && |
18 | rm -f sample && | |
19 | ||
20 | test_tick && | |
21 | git commit -a -m Second | |
22 | ||
23 | ' | |
24 | ||
25 | test_expect_success 'diff -M' ' | |
26 | ||
9b6d1fc4 SM |
27 | git diff-tree -M -r --name-status HEAD^ HEAD >tmp && |
28 | sed -e "s/R[0-9]*/RNUM/" tmp >actual && | |
b9905fed | 29 | echo "RNUM sample elpmas" >expect && |
82ebb0b6 | 30 | test_cmp expect actual |
b9905fed JH |
31 | |
32 | ' | |
33 | ||
34 | test_done |