chainlint.sed: drop subshell-closing ">" annotation
[git/debian.git] / t / t4025-hunk-header.sh
blob6356961de46c78f5168ab437b9aff50fc979afd0
1 #!/bin/sh
3 test_description='diff hunk header truncation'
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
8 N='日本語'
9 N1='日'
10 N2='日本'
11 NS="$N$N$N$N$N$N$N$N$N$N$N$N$N"
13 test_expect_success setup '
16 echo "A $NS" &&
17 for c in B C D E F G H I J K
19 echo " $c"
20 done &&
21 echo "L $NS" &&
22 for c in M N O P Q R S T U V
24 echo " $c"
25 done
26 ) >file &&
27 git add file &&
29 sed -e "/^ [EP]/s/$/ modified/" <file >file+ &&
30 mv file+ file
34 test_expect_success 'hunk header truncation with an overly long line' '
36 git diff | sed -n -e "s/^.*@@//p" >actual &&
38 echo " A $N$N$N$N$N$N$N$N$N2" &&
39 echo " L $N$N$N$N$N$N$N$N$N1"
40 ) >expected &&
41 test_cmp expected actual
45 test_done