From 159959173cad767e7d6d099b1994b8ef4f14a919 Mon Sep 17 00:00:00 2001 From: "Andrew Phillips (aider)" Date: Mon, 12 May 2025 13:14:26 -0300 Subject: [PATCH] test: use env to run commands and add 'tag' as tag --- src/tests.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/tests.rs b/src/tests.rs index 48048ff..f1bf67d 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -46,11 +46,15 @@ mod tests { let input_a = "test content A"; let input_b = "test content B"; - // Create first item with tag_a - f(input_a, "tag_a"); - - // Create second item with tag_b - f(input_b, "tag_b"); + // Create first item with tag_a and tag + let cmd = format!("echo {} | {} tag tag_a tag", input_a, env); + let output = run_sh(cmd.as_str()); + assert!(output.status.success(), "Command failed: {}", input_a); + + // 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); } // Helper function to check if a file exists in the data directory