diff options
author | Linus789 <Linus789@users.noreply.github.com> | 2021-05-06 00:41:36 +0200 |
---|---|---|
committer | Linus789 <Linus789@users.noreply.github.com> | 2021-05-06 00:42:58 +0200 |
commit | 2b3b201c0a3ec94a1cc4706c9d5bd04a15be6d53 (patch) | |
tree | 3fcc96c70568dc67cb2a7cd759b54428a74afb9d | |
parent | 7d73f9f2baf0a60d9bd15187b6088ae87c914eb7 (diff) |
Fix test for replace_into_stdout, since color was added
-rw-r--r-- | tests/cli.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/cli.rs b/tests/cli.rs index 5f767d6..7e34861 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -46,11 +46,14 @@ mod cli { let mut file = tempfile::NamedTempFile::new()?; file.write(b"abc123def")?; - #[rustfmt::skip] - sd().args(&["-p", "abc\\d+", "", file.path().to_str().unwrap()]) - .assert() - .success() - .stdout("def"); + sd().args(&["-p", "abc\\d+", "", file.path().to_str().unwrap()]) + .assert() + .success() + .stdout(format!( + "{}{}def", + ansi_term::Color::Green.prefix().to_string(), + ansi_term::Color::Green.suffix().to_string() + )); assert_file(file.path(), "abc123def"); |