aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/081.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/081.sh')
-rw-r--r--tests/081.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/081.sh b/tests/081.sh
new file mode 100644
index 0000000..03239bc
--- /dev/null
+++ b/tests/081.sh
@@ -0,0 +1,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