diff options
Diffstat (limited to 'tests/046.sh')
| -rw-r--r-- | tests/046.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/046.sh b/tests/046.sh new file mode 100644 index 0000000..3011ff3 --- /dev/null +++ b/tests/046.sh @@ -0,0 +1,21 @@ +set -e + +cat <<'EOF' > expected +42 +EOF +bash ../../test_diff.sh <<'EOF' +void* calloc(); +int printf(); + +struct S { + int x; +}; +typedef struct S S; + +int main() { + S* s = calloc(1, sizeof(S)); + s->x = 42; + printf("%d\n", s->x); + return 0; +} +EOF |
