Skip to content

dune runtest and colored strings in terminal #2664

@sapristi

Description

@sapristi

Hello,
I noticed a strange behaviour of dune runtest.
Say I have the following file test_colors.ml :

let f s =
  output_string stdout ( "\027[34m" ^ s ^ "\027[39m"); flush stdout
    in

    for i= 1 to 20 do
      f (string_of_int i)
    done

And the dune file

(test
 (name test_colors) )

When executing dune runtest, i get the following :
Capture d’écran_2019-09-22_14-16-13
where I would have expected all the characters to be colorized instead.

I have (quickly) tested with different versions of dune; I think the problem appeared in version 1.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions