aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/081.sh
blob: 03239bcf1d627da28c02ed328fe3af6b7a4fc728 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
set -e

cat <<'EOF' > expected
2 42
8 123
EOF

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

int main() {
    short a = 42;
    printf("%zu %hd\n", sizeof(a), a);
    short* b = &a;
    *b = 123;
    printf("%zu %hd\n", sizeof(b), *b);
}
EOF