Skip to content

Commit

Permalink
tests: add --version test
Browse files Browse the repository at this point in the history
  • Loading branch information
jqnatividad committed Aug 21, 2024
1 parent 607eb0e commit a22a330
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_count.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,3 +325,14 @@ fn prop_count_noheaders_indexed_env() {
}
qcheck(p as fn(CsvData) -> bool);
}

#[test]
fn show_version() {
let wrk = Workdir::new("show_version");
let mut cmd = wrk.command("");
cmd.arg("--version");

let got: String = wrk.stdout(&mut cmd);
let expected = format!(" {}", env!("CARGO_PKG_VERSION"));
assert!(got.contains(&expected));
}

0 comments on commit a22a330

Please sign in to comment.