I’m stuck on Stage #(IP1).
The test checks the output before my program has finished printing it all.
Here are my logs:
remote: [tester::#IP1] Running tests for Stage #IP1 (Run a program)
remote: [tester::#IP1] Running ./your_program.sh
remote: [your-program] $
remote: [tester::#IP1] > my_exe Emily
remote: [your-program] Hello Emily
remote: [tester::#IP1] Expected: “Hello Emily! The secret code is 7427569622.”
remote: [tester::#IP1] Received: “Hello Emily”
remote: [your-program] ! The secret code is 7427569622.
remote: [your-program] $
remote: [tester::#IP1] Received output does not match expectation.
And here’s a snippet of my code:
fn execute_external_command(command: &str, arguments: &str) {
if let Some(path) = find_command(command) {
Command::new(path)
.arg(arguments)
.status()
.expect("Failed to execute command");
} else {
println!("{}: command not found", command);
}
}