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