aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/054.sh
blob: 06252b959ac3c59aa1891116bdb13b99ca4ba21b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
set -e

cat <<'EOF' > expected
0
1
EOF
bash ../../test_diff.sh <<'EOF'
int printf();
void* calloc();

struct S {
    int a;
    int b;
};

int main() {
    struct S* s = calloc(1, sizeof(struct S));
    s->b = 1;
    printf("%ld\n", s->a);
    printf("%ld\n", s->b);
    return 0;
}
EOF