aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-05-08 23:15:56 +0900
committernsfisis <nsfisis@gmail.com>2025-05-08 23:15:56 +0900
commitad400b7377433fb4bc30d883c9a8389f78e3565d (patch)
treefbe10c990c82de6f06686ace2e39c563283830fe /tests
parentd4277532c3b8a3ce4c03aa28eee83f4f68afb048 (diff)
downloadducc-ad400b7377433fb4bc30d883c9a8389f78e3565d.tar.gz
ducc-ad400b7377433fb4bc30d883c9a8389f78e3565d.tar.zst
ducc-ad400b7377433fb4bc30d883c9a8389f78e3565d.zip
implement typedef
Diffstat (limited to 'tests')
-rw-r--r--tests/046.sh21
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