aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/058.sh
blob: b491ad4acd8bf9a2cf4761e24ec204f5cd2b52d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
cat <<'EOF' > expected
include depth limit exceeded
EOF

# Create circular include files
cat <<'EOF' > a.h
#include "b.h"
int a() { return 1; }
EOF

cat <<'EOF' > b.h
#include "a.h"
int b() { return 2; }
EOF

test_compile_error <<'EOF'
#include "a.h"

int main() {
    a() + b();
    return 0;
}
EOF