Skip to content

Commit

Permalink
tests: add assert_success in json tests so we can see the output …
Browse files Browse the repository at this point in the history
…should the assert_eq fail
  • Loading branch information
jqnatividad committed Jul 29, 2024
1 parent acdd259 commit f7bd534
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ fn json_array_simple() {
let mut cmd = wrk.command("json");
cmd.arg("data.json");

wrk.assert_success(&mut cmd);

let got: Vec<Vec<String>> = wrk.read_stdout(&mut cmd);
let expected = vec![
svec!["id", "father", "mother", "oldest_child", "boy"],
Expand Down Expand Up @@ -91,6 +93,8 @@ fn json_object_select_column_output() {
cmd.args(["--select", "id,mother,oldest_child,father"])
.arg("data.json");

wrk.assert_success(&mut cmd);

let got: Vec<Vec<String>> = wrk.read_stdout(&mut cmd);
let expected = vec![
svec!["id", "mother", "oldest_child", "father"],
Expand Down

0 comments on commit f7bd534

Please sign in to comment.