aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-05-11 19:33:17 +0900
committernsfisis <nsfisis@gmail.com>2025-05-11 19:33:17 +0900
commitb6e59680819b1cea7ec1f081d246bef537b89f47 (patch)
tree42b521a6db0215a1211d61943b8c6813645b86da /tests
parent4e90e06cdb497a9099da619dc5728306f9a7c019 (diff)
downloadducc-b6e59680819b1cea7ec1f081d246bef537b89f47.tar.gz
ducc-b6e59680819b1cea7ec1f081d246bef537b89f47.tar.zst
ducc-b6e59680819b1cea7ec1f081d246bef537b89f47.zip
implement extern var decl
Diffstat (limited to 'tests')
-rw-r--r--tests/049.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/049.sh b/tests/049.sh
new file mode 100644
index 0000000..114bdb9
--- /dev/null
+++ b/tests/049.sh
@@ -0,0 +1,32 @@
+set -e
+
+cat <<'EOF' > input
+foo
+bar
+baz
+EOF
+cat <<'EOF' > expected
+foo
+foo
+bar
+bar
+baz
+baz
+EOF
+bash ../../test_diff.sh hoge piyo fuga<<'EOF'
+struct FILE;
+typedef struct FILE FILE;
+extern FILE* stdin;
+extern FILE* stdout;
+int fprintf();
+char* fgets();
+void* calloc();
+
+int main() {
+ char* buf = calloc(256, sizeof(char));
+ while (fgets(buf, 256, stdin)) {
+ fprintf(stdout, "%s%s", buf, buf);
+ }
+ return 0;
+}
+EOF