Debian Codegraph @

tests/fullheader2/run-test

raw
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 diff --git a/elf/tst-audit11mod1.c b/elf/tst-audit11mod1.c
11 new file mode 100644
12 index 0000000..f0c06ab
13 --- /dev/null
14 +++ b/elf/tst-audit11mod1.c
15 @@ -0,0 +1,6 @@
16 +extern int f2 (void);
17 +int
18 +f1 (void)
19 +{
20 + return f2 ();
21 +}
22 diff --git a/elf/tst-audit11mod2.c b/elf/tst-audit11mod2.c
23 new file mode 100644
24 index 0000000..cd3c9b1
25 --- /dev/null
26 +++ b/elf/tst-audit11mod2.c
27 @@ -0,0 +1,5 @@
28 +int
29 +f2 (void)
30 +{
31 + return 42;
32 +}
33 EOF
34
35 ${INTERDIFF} git-output git-output 2>errors >index || { cat errors; exit 1; }
36 [ -s errors ] && { cat errors; exit 1; }
37 [ -s index ] && { cat index; exit 1; }
38 exit 0