mirror of
https://github.com/chmln/sd
synced 2024-11-24 20:23:04 +00:00
Fix test for replace_into_stdout, since color was added
This commit is contained in:
parent
7d73f9f2ba
commit
2b3b201c0a
1 changed files with 8 additions and 5 deletions
13
tests/cli.rs
13
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");
|
||||
|
||||
|
|
Loading…
Reference in a new issue