From cff517c8c682a7d1a4bdfb28e7cb8e7cf7826d95 Mon Sep 17 00:00:00 2001 From: David Peter Date: Thu, 20 Apr 2023 12:49:53 +0200 Subject: [PATCH] Add regression test for #640 --- tests/integration_tests.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index eb5765607..7510d07c6 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -345,3 +345,20 @@ fn performs_all_benchmarks_in_parameter_scan() { .and(predicate::str::contains("Benchmark 5: sleep 50").not()), ); } + +#[test] +#[cfg(unix)] +fn intermediate_results_are_not_exported_to_stdout() { + hyperfine_debug() + .arg("--style=none") // To only see the Markdown export on stdout + .arg("--export-markdown") + .arg("-") + .arg("sleep 1") + .arg("sleep 2") + .assert() + .success() + .stdout( + (predicate::str::contains("sleep 1").count(1)) + .and(predicate::str::contains("sleep 2").count(1)), + ); +}