aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/029.sh
blob: 7904c172f3d9a6541c73448c339a51e8868e8253 (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
set -e

cat <<'EOF' > expected
42
123
EOF
bash ../../test_diff.sh <<'EOF'
struct S {
    int a;
    int b;
};

int printf();
void* calloc();

int main() {
    struct S* sp;
    sp = calloc(1, sizeof(struct S));
    sp->a = 42;
    printf("%d\n", sp->a);
    (*sp).b = 123;
    printf("%d\n", (*sp).b);
    return 0;
}
EOF