File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -221,13 +221,15 @@ TESTS = tests/newline1/run-test \
221
221
tests/fullheader1/run-test \
222
222
tests/fullheader2/run-test \
223
223
tests/fullheader3/run-test \
224
+ tests/fullheader4/run-test \
224
225
tests/whitespace/run-test
225
226
226
227
# These ones don't work yet.
227
228
# Feel free to send me patches. :-)
228
229
XFAIL_TESTS = \
229
230
tests/delhunk5/run-test \
230
- tests/delhunk6/run-test
231
+ tests/delhunk6/run-test \
232
+ tests/fullheader4/run-test
231
233
232
234
distclean-local :
233
235
-rm -rf $(top_builddir ) /test-arena
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # This is a filterdiff(1) testcase.
4
+ # Handle git format-patch output when stripping pathname components
5
+ # From: https://github.com/twaugh/patchutils/issues/12
6
+
7
+ . ${top_srcdir-.} /tests/common.sh
8
+
9
+ cat << "EOF " > git-output
10
+ diff --git a/test.txt b/test.txt
11
+ index 257cc56..5716ca5 100644
12
+ --- a/test.txt
13
+ +++ b/test.txt
14
+ @@ -1 +1 @@
15
+ -foo
16
+ +bar
17
+ EOF
18
+
19
+ ${FILTERDIFF} --strip=1 git-output 2> errors > output || { cat errors; exit 1; }
20
+ [ -s errors ] && { cat errors; exit 1; }
21
+ cmp output << "EOF " || exit 1
22
+ diff --git a/test.txt b/test.txt
23
+ index 257cc56..5716ca5 100644
24
+ --- test.txt
25
+ +++ test.txt
26
+ @@ -1 +1 @@
27
+ -foo
28
+ +bar
29
+ EOF
30
+ exit 0
You can’t perform that action at this time.
0 commit comments