From f7bd534f56e1627e8fee45a0fee1b878f86ac1a3 Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Mon, 29 Jul 2024 14:48:21 -0400 Subject: [PATCH] `tests`: add assert_success in `json` tests so we can see the output should the assert_eq fail --- tests/test_json.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_json.rs b/tests/test_json.rs index 4f16173df..a40792c74 100644 --- a/tests/test_json.rs +++ b/tests/test_json.rs @@ -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> = wrk.read_stdout(&mut cmd); let expected = vec![ svec!["id", "father", "mother", "oldest_child", "boy"], @@ -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> = wrk.read_stdout(&mut cmd); let expected = vec![ svec!["id", "mother", "oldest_child", "father"],