aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
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