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

Fix ANSI colors in Windows CMD and PowerShell #28

Merged
merged 5 commits into from Feb 20, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.toml
Expand Up @@ -18,3 +18,5 @@ travis-ci = { repository = "colin-kiegel/rust-pretty-assertions" }
[dependencies]
difference = "2.0.0"
ansi_term = "0.11"
output_vt100 = "0.1"
ctor = "0.1.7"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10 changes: 9 additions & 1 deletion src/lib.rs
Expand Up @@ -2,7 +2,7 @@
//!
//! When writing tests in Rust, you'll probably use `assert_eq!(a, b)` _a lot_.
//!
//! If such a test fails, it will present all the details of `a` and `b`.
//! If such a test fails, it will present all the details of `a` and `b`.
//! But you have to spot the differences yourself, which is not always straightforward,
//! like here:
//!
Expand Down Expand Up @@ -67,6 +67,8 @@

extern crate difference;
extern crate ansi_term;
extern crate output_vt100;
extern crate ctor;
mod format_changeset;

use std::fmt::{self, Debug, Display};
Expand All @@ -75,6 +77,12 @@ use difference::Changeset;
use format_changeset::format_changeset;
pub use ansi_term::Style;

use ctor::*;
#[ctor]
fn init() {
output_vt100::init();
}

#[doc(hidden)]
pub struct Comparison(Changeset);

Expand Down