aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/079.sh
blob: 4381f4503a5c2dd9da09c35d266ba43481b66b11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
set -e

cat <<'EOF' > expected
42
EOF

cat <<'EOF' > header.h
#ifndef HEADER_H
#define HEADER_H

int f() { return 42; }

#endif
EOF

bash ../../test_diff.sh <<'EOF'
#include "header.h"
#include "header.h"
#include "header.h"

int printf();

int main() {
    printf("%d\n", HEADER_H HEADER_H HEADER_H f() HEADER_H HEADER_H HEADER_H);
    return 0;
}
EOF