]> granicus.if.org Git - re2c/commitdiff
Fixed #141 "Tests under Windows".
authorUlya Trofimovich <skvadrik@gmail.com>
Fri, 29 Apr 2016 07:16:12 +0000 (08:16 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Sun, 30 Jul 2017 10:48:31 +0000 (11:48 +0100)
Thanks to Abs62, who noted that under Windows (in MSYS) tests fail
because '2>"$outc.stderr"' dumps CRLF to file instead of LF
and proposed a fix:
    sed -i 's/\r//g' "$outc.stderr"

re2c/run_tests.sh.in

index 700edf22589f32552ec6e01c997d580563fcd606..19ada28dc6ce85e6a89c3a8c465e3d765d8e5b2b 100644 (file)
@@ -173,6 +173,8 @@ run_pack() {
                                && cp "../../$x" "$outx"
                        # run re2c
                        $valgrind $wine ../../$re2c $switches "$outx" 2>"$outc.stderr" 1>&2
+                       # on windows stdout and stderr contain CR LF, cut CR to match test results
+                       sed -i 's/\r//g' "$outc.stderr"
                        # paste all files dropped by re2c into output file
                        rm "$outx" && find . -type f \
                                | lc_run sort \