diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/039.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/039.sh b/tests/039.sh new file mode 100644 index 0000000..fb9dbdb --- /dev/null +++ b/tests/039.sh @@ -0,0 +1,32 @@ +set -e + +cat <<'EOF' > expected +65 +65 +66 +67 +68 +EOF +bash ../../test_diff.sh <<'EOF' +void* calloc(); +int printf(); + +int main() { + char* source = calloc(4, sizeof(char)); + + source[0] = 'A'; + source[1] = 'B'; + source[2] = 'C'; + source[3] = 'D'; + + int a = source[0]; + + printf("%d\n", a); + printf("%d\n", source[0]); + printf("%d\n", source[1]); + printf("%d\n", source[2]); + printf("%d\n", source[3]); + + return 0; +} +EOF |
