qcheck icon indicating copy to clipboard operation
qcheck copied to clipboard

Converted OUnit tests have ANSI escape sequences

Open hongchangwu opened this issue 4 years ago • 1 comments

e.g., https://github.com/c-cube/qcheck/blob/48afef1dd3d6fb76c3b312990ad2a23f1f6c4a36/src/ounit/QCheck_ounit.ml#L36 causes problem in the JUnit output.

To reproduce, run converted OUnit tests with -output-junit-file junit.xml and examine the XML (I used OUnit2.run_test_tt_main as the runner).

Maybe color output should be opt-in? For example, the OUnit has an option:

  -ci {true|false}                Display logs for CI, like Travis and AppVeyor, in the console with colors. (default: false)

hongchangwu avatar Jul 28 '21 09:07 hongchangwu

I've tried dune exec -- example/ounit/QCheck_ounit_test.exe -output-junit-file foo.xml -verbose true but I'm not sure what exactly to look at, or how to find the escape sequences in the xml file. There's no raw escape code, but is the problem about xml escaping of them?

c-cube avatar Jul 30 '21 18:07 c-cube