Skip to content
Myr

Fix tests on Windows

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Peter · committed by David Peter · parent e71ff55 · Browse files · 1 file+9 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−3 removed

  • tests:+9 added−3 removed

1 file+9 added−3 removed

modified:tests/integration_tests.rs+9 added-3 removed
15 unmodified lines
16#[test]17fn hyperfine_runs_successfully() {18 hyperfine()19 .arg("--runs=2")20 .arg("echo 'dummy benchmark'")20 .arg("echo dummy benchmark")21 .assert()22 .success();23}2425#[test]26fn at_least_two_runs_are_required() {27 hyperfine()28 .arg("--runs=1")29 .arg("echo 'dummy benchmark'")29 .arg("echo dummy benchmark")30 .assert()31 .failure();32}33
24 unmodified lines
58 }5960 fn get_command(&self, output: &str) -> String {61 format!(62 "echo '{output}' >> {path}",62 "echo {output} >> {path}",63 output = output,64 path = self.logfile_path.to_string_lossy()65 )66 }
14 unmodified lines
81 }8283 fn expect_output(&mut self, output: &str) -> &mut Self {84 self.expected_content.push_str(output);8586 #[cfg(windows)]87 {88 self.expected_content.push_str(" \r");89 }9091 self.expected_content.push('\n');92 self93 }94
120 unmodified lines