josecelano / cargo-pretty-test

A Rust command that prettifies the ugly `cargo test` output into a beautiful one.
https://users.rust-lang.org/t/cargo-test-output-with-indentation/100149
135 stars 1 forks source link

feat: add/set no-color feature for testing #19

Closed zjp-CN closed 1 year ago

zjp-CN commented 1 year ago

fix https://github.com/josecelano/cargo-pretty-test/issues/13 and suppress https://github.com/josecelano/cargo-pretty-test/pull/14

With this PR, you can use any of these commands to run tests:

josecelano commented 1 year ago

Hi @zjp-CN, I was wondering if it wouldn't make more sense to set "no-color" as the default and "with-color" as the feature. For me, a negative feature looks weird.

For the cargo run --color option. The default option is auto.

image

Do you think we should do the same?

And you can also specify the value with a config value.

https://doc.rust-lang.org/cargo/reference/config.html

I have the impression that by default, we should not use color, because It would make testing easier. And then we can have unit tests for the colorized output. However, I have not had time to read the code and think about it carefully.

josecelano commented 1 year ago

ACK f5deb0965e73de5f6822a0fd7c02346c0a64fada