summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLinus789 <Linus789@users.noreply.github.com>2021-05-06 00:41:36 +0200
committerLinus789 <Linus789@users.noreply.github.com>2021-05-06 00:42:58 +0200
commit2b3b201c0a3ec94a1cc4706c9d5bd04a15be6d53 (patch)
tree3fcc96c70568dc67cb2a7cd759b54428a74afb9d /tests
parent7d73f9f2baf0a60d9bd15187b6088ae87c914eb7 (diff)
Fix test for replace_into_stdout, since color was added
Diffstat (limited to 'tests')
-rw-r--r--tests/cli.rs13
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");