Skip to content

Commit 7d631ca

Browse files
committed
Another test for handling git output (bug #1211062).
Currently fails.
1 parent e217a4b commit 7d631ca

File tree

3 files changed

+46
-2
lines changed

3 files changed

+46
-2
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2015-04-13 Tim Waugh <[email protected]>
2+
3+
* tests/fullheader2/run-test: Another test for handling git
4+
output.
5+
* Makefile.am: Run it. Currently expected to fail.
6+
17
2015-03-20 Tim Waugh <[email protected]>
28

39
* tests/fullheader1/run-test: Test for handling git output.

Makefile.am

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ TESTS = tests/newline1/run-test \
215215
tests/clean2/run-test \
216216
tests/stdin/run-test \
217217
tests/splitdiffD/run-test \
218-
tests/fullheader1/run-test
218+
tests/fullheader1/run-test \
219+
tests/fullheader2/run-test
219220

220221
# These ones don't work yet.
221222
# Feel free to send me patches. :-)
@@ -224,7 +225,8 @@ XFAIL_TESTS = \
224225
tests/delhunk6/run-test \
225226
tests/trimlast1/run-test \
226227
tests/trimlast2/run-test \
227-
tests/fullheader1/run-test
228+
tests/fullheader1/run-test \
229+
tests/fullheader2/run-test
228230

229231
distclean-local:
230232
-rm -rf $(top_builddir)/test-arena

tests/fullheader2/run-test

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/sh
2+
3+
# This is an interdiff(1) testcase.
4+
# Deal with git format-patch output more intelligently.
5+
# From: https://bugzilla.redhat.com/show_bug.cgi?id=1211062
6+
7+
. ${top_srcdir-.}/tests/common.sh
8+
9+
cat <<"EOF" > git-output
10+
new file mode 100644
11+
index 0000000..f0c06ab
12+
--- /dev/null
13+
+++ b/elf/tst-audit11mod1.c
14+
@@ -0,0 +1,6 @@
15+
+extern int f2 (void);
16+
+int
17+
+f1 (void)
18+
+{
19+
+ return f2 ();
20+
+}
21+
diff --git a/elf/tst-audit11mod2.c b/elf/tst-audit11mod2.c
22+
new file mode 100644
23+
index 0000000..cd3c9b1
24+
--- /dev/null
25+
+++ b/elf/tst-audit11mod2.c
26+
@@ -0,0 +1,5 @@
27+
+int
28+
+f2 (void)
29+
+{
30+
+ return 42;
31+
+}
32+
EOF
33+
34+
${INTERDIFF} git-output git-output 2>errors >index || { cat errors; exit 1; }
35+
[ -s errors ] && { cat errors; exit 1; }
36+
[ -s index ] && { cat index; exit 1; }

0 commit comments

Comments
 (0)