aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/testsuite.at
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-08-09 19:45:56 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-08-09 19:45:56 +0300
commitacae72517bc892911bf9b0f261ef41356e7e2c44 (patch)
tree84b567960ec50c99076f4f5166cc33ee50456c6e /tests/testsuite.at
parentc8bdb828d00cd193be4ae03e32beb46e4cf6a317 (diff)
downloadsciteco-acae72517bc892911bf9b0f261ef41356e7e2c44.tar.gz
Win32: avoid any automatic LF to CRLF conversions when writing to stdout
* At least the MSVCRT does this by default, i.e. the translation mode of stdout is not _O_BINARY. * This broke piping through SciTECO with --stdin --stdout, as this relies on SciTECO's builtin EOL normalization. Instead, you would get DOS linebreaks on output even if the source stream contains only UNIX linebreaks. * It would also break binary filters. * It seems to be safe to print only LF also for regular stdio (help and error messages), so I simply disaply the stdout (and stdin and stderr) EOL translation globally. * Also fixes Troff warnings due to the .in preprocessor writing output with DOS linebreaks. * Added a test case. All future platforms shouldn't perform any unexpected EOL translations on output.
Diffstat (limited to 'tests/testsuite.at')
-rw-r--r--tests/testsuite.at4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 3a2fc2e..3728723 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -232,6 +232,10 @@ AT_DATA([expout], [[1058
1058
]])
AT_CHECK([[printf "ТЕСТ" | $SCITECO -qe '<^TUa Qa:; Qa=>']], 0, expout, ignore)
+# Writing to stdout should not perform any unexpected EOL translations.
+# When using --stdin/--stdout, we can rely on the builtin EOL normalization.
+TE_CHECK([[10^T]], 0, stdout, ignore)
+TE_CHECK([[16,0ED @EB/stdout/ Z-1"N(0/0)' 0A-10"N(0/0)']], 0, ignore, ignore)
AT_CLEANUP
AT_SETUP([Convert between line and glyph positions])