blob: 51aeca8a170a1fa80719755a7bf82d516d1227c1 (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
cat <<'EOF' > expected
1
EOF
test_diff <<'EOF'
int printf();
int main() {
printf("%d\n", __ducc__);
return 0;
}
EOF
cat <<'EOF' > expected
main.c
main.c
main.c
EOF
cat <<'EOF' > header.h
#define A __FILE__
EOF
test_diff <<'EOF'
#define B __FILE__
#include "header.h"
int printf();
int main() {
printf("%s\n", __FILE__);
printf("%s\n", B);
printf("%s\n", A);
}
EOF
cat <<'EOF' > expected
5
6 6
7 7
EOF
cat <<'EOF' > header.h
#define A __LINE__
EOF
test_diff <<'EOF'
#define B __LINE__
#include "header.h"
int printf();
int main() {
printf("%d\n", __LINE__);
printf("%d %d\n", B, B);
printf("%d %d\n", A, A);
}
EOF
|