Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show color in doc test results #193

Open
joshka opened this issue May 30, 2024 · 1 comment
Open

Show color in doc test results #193

joshka opened this issue May 30, 2024 · 1 comment

Comments

@joshka
Copy link
Contributor

joshka commented May 30, 2024

Bacon doesn't appear to colorize test failures in doc tests:

Given the following Error code (intentionally created):

    /// # Examples
    ///
    /// ```
    /// # use ratatui::{prelude::*, buffer::Cell, layout::Position};
    /// let buf = Buffer::empty(Rect::new(0, 0, 10, 10));
    /// let cell = buf[(0, 0)];
    /// let cell = &buf[Position::new(0, 0)];
    /// ```

Cargo test --doc buffer/buffer output:

image

Bacon config:

[jobs.test]
command = [
    "cargo", "test",
    "--all-features",
    "--color", "always",
    "--", "--color", "always", # see https://github.com/Canop/bacon/issues/124
]
need_stdout = true

Bacon output:
image

@Canop
Copy link
Owner

Canop commented May 31, 2024

It looks like cargo test doesn't respect the --color always argument. This might be a regression in cargo test (but it's also possible this was always the case, cargo test is a weird complicated construct).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants