blob: 7af3fbcc7b9e5e61e41205accaa6d81e85cae6cf [file] [log] [blame]
Junio C Hamanob9905fe2007-06-28 23:14:13 -07001#!/bin/sh
2
3test_description='ignore CR in CRLF sequence while computing similiarity'
4
5. ./test-lib.sh
6
7test_expect_success setup '
8
Junio C Hamanobfdbee92008-08-08 02:26:28 -07009 cat "$TEST_DIRECTORY"/t0022-crlf-rename.sh >sample &&
Junio C Hamanob9905fe2007-06-28 23:14:13 -070010 git add sample &&
11
12 test_tick &&
13 git commit -m Initial &&
14
Stephen Boydf4e6dcc2010-01-25 16:33:58 -080015 append_cr <"$TEST_DIRECTORY"/t0022-crlf-rename.sh >elpmas &&
Junio C Hamanob9905fe2007-06-28 23:14:13 -070016 git add elpmas &&
17 rm -f sample &&
18
19 test_tick &&
20 git commit -a -m Second
21
22'
23
24test_expect_success 'diff -M' '
25
26 git diff-tree -M -r --name-status HEAD^ HEAD |
27 sed -e "s/R[0-9]*/RNUM/" >actual &&
28 echo "RNUM sample elpmas" >expect &&
Jeff King82ebb0b2008-03-12 17:36:36 -040029 test_cmp expect actual
Junio C Hamanob9905fe2007-06-28 23:14:13 -070030
31'
32
33test_done