summaryrefslogtreecommitdiff
path: root/tests/test-dfa-match-aux.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-dfa-match-aux.c')
-rw-r--r--tests/test-dfa-match-aux.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test-dfa-match-aux.c b/tests/test-dfa-match-aux.c
index b39bb6da86..cef29e6a83 100644
--- a/tests/test-dfa-match-aux.c
+++ b/tests/test-dfa-match-aux.c
@@ -26,6 +26,8 @@
#include <dfa.h>
#include <localeinfo.h>
+#include "binary-io.h"
+
_Noreturn void
dfaerror (char const *mesg)
{
@@ -53,6 +55,11 @@ main (int argc, char **argv)
if (argc < 3)
exit (EXIT_FAILURE);
+ /* This test's fixture needs to compare this program's output with an expected
+ output. On native Windows, the CR-LF newlines would cause this comparison
+ to fail. But we don't want to postprocess this program's output. */
+ set_binary_mode (STDOUT_FILENO, O_BINARY);
+
setlocale (LC_ALL, "");
init_localeinfo (&localeinfo);