aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/085.sh
blob: 10ab24c89ead06834768d234df336f0bb4a9c814 (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
set -e

cat <<'EOF' > expected
0
42
48
0
0
0
0
0
0
0
0
0
0
0
0
123
EOF

bash ../../test_diff.sh <<'EOF'
int printf();

int a;
int b[12];

int main() {
    printf("%d\n", a);
    a = 42;
    printf("%d\n", a);
    printf("%zu\n", sizeof(b));
    int i;
    for (i = 0; i < 12; ++i) {
        printf("%d\n", b[i]);
    }
    b[11] = 123;
    printf("%d\n", b[11]);
}
EOF