Skip to content

Commit

Permalink
tests: add --not-one success test for replace
Browse files Browse the repository at this point in the history
  • Loading branch information
rzmk committed Nov 22, 2024
1 parent 46f7d73 commit fcba7b5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/test_replace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,25 @@ fn replace_nomatch() {
wrk.assert_err(&mut cmd);
}

#[test]
fn replace_nomatch_notone() {
let wrk = Workdir::new("replace_nomatch_notone");
wrk.create(
"data.csv",
vec![
svec!["identifier", "color"],
svec!["164.5", "yellow"],
svec!["165.6", "yellow"],
svec!["166.7", "yellow"],
svec!["167.8", "yellow.1"],
],
);
let mut cmd = wrk.command("replace");
cmd.arg("\\.0$").arg("").arg("data.csv").arg("--not-one");

wrk.assert_success(&mut cmd);
}

#[test]
fn replace_null() {
let wrk = Workdir::new("replace_null");
Expand Down

0 comments on commit fcba7b5

Please sign in to comment.