aboutsummaryrefslogtreecommitdiff
path: root/test-suite/misc
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2020-05-18 22:12:29 +0200
committerEmilio Jesus Gallego Arias2020-05-19 19:46:56 +0200
commitfb0caf14daff2e433dfc33ca564d49b26f7e8fb4 (patch)
treef521c06d90108790ae58594cb928c5d5efec7299 /test-suite/misc
parented0f2f08e31ee4e645aa6e52970ddefc60f1f4f9 (diff)
[topfmt] Set formatter + flush fix
Closes #12351. We set the parameters of the redirect formatter to be same than the ones in stdout. I guess the original semantics was to ignore the parameters, so I'm unsure we want to do this. While we are a it, we include a fix on the formatter, which _must_ be flushed before closing its associated channel.
Diffstat (limited to 'test-suite/misc')
-rw-r--r--test-suite/misc/redirect_printing.out2
-rwxr-xr-xtest-suite/misc/redirect_printing.sh4
-rw-r--r--test-suite/misc/redirect_printing.v2
3 files changed, 8 insertions, 0 deletions
diff --git a/test-suite/misc/redirect_printing.out b/test-suite/misc/redirect_printing.out
new file mode 100644
index 0000000000..4f45c4d4c2
--- /dev/null
+++ b/test-suite/misc/redirect_printing.out
@@ -0,0 +1,2 @@
+nat_ind
+ : forall P : nat -> Prop, P 0 -> (forall n : nat, P n -> P (S n)) -> forall n : nat, P n
diff --git a/test-suite/misc/redirect_printing.sh b/test-suite/misc/redirect_printing.sh
new file mode 100755
index 0000000000..7da17407f3
--- /dev/null
+++ b/test-suite/misc/redirect_printing.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+$coqc misc/redirect_printing.v
+diff -u redirect_test.out misc/redirect_printing.out
diff --git a/test-suite/misc/redirect_printing.v b/test-suite/misc/redirect_printing.v
new file mode 100644
index 0000000000..2f9096bcb8
--- /dev/null
+++ b/test-suite/misc/redirect_printing.v
@@ -0,0 +1,2 @@
+Set Printing Width 999999.
+Redirect "redirect_test" Check nat_ind.