From e72ef13c60baf7fa0baab73d8607977dafef4b2b Mon Sep 17 00:00:00 2001 From: "Andrew Phillips (aider)" Date: Mon, 12 May 2025 16:02:26 -0300 Subject: [PATCH] test: improve error messages with command and status --- src/tests.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tests.rs b/src/tests.rs index e1481e1..dcfe5c3 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -52,7 +52,7 @@ mod tests { // Create second item with tag_b and tag let cmd = format!("echo {} | {} tag tag_b tag", INPUT_B, env); let output = run_sh(cmd.as_str()); - assert!(output.status.success(), "Command failed: {}", INPUT_B); + assert!(output.status.success(), "Command failed: {} {}", cmd, output.status); } // Helper function to check if a file exists in the data directory @@ -330,12 +330,12 @@ mod tests { // Test with no compression let cmd = format!("echo {} | {} -c none --tag none", INPUT_A, env); let output = run_sh(cmd.as_str()); - assert!(output.status.success(), "Command failed: {}", INPUT_A); + assert!(output.status.success(), "Command failed: {} {}", cmd, output.status); // Test with lz4 compression let cmd = format!("echo {} | {} -c lz4 --tag lz4", INPUT_A, env); let output = run_sh(cmd.as_str()); - assert!(output.status.success(), "Command failed: {}", INPUT_A); + assert!(output.status.success(), "Command failed: {} {}", cmd, output.status); // Test with gzip compression let cmd = format!("echo {} | {} -c gzip --tag gzip", INPUT_A, env);