summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Peter <mail@david-peter.de>2021-08-23 22:00:33 +0200
committerDavid Peter <mail@david-peter.de>2021-08-23 22:21:40 +0200
commit1e49ff6f8b096888a9a85d0a483bc97053e48432 (patch)
tree31af0eb2ef00214a18779c198f3c9032ec33aeda
parentbec4fc12839153d2bb42b9c746a6a60354b908a0 (diff)
Fix tests on Windowsintegration-tests
-rw-r--r--tests/integration_tests.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs
index 1f93721..8328f06 100644
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -17,7 +17,7 @@ fn hyperfine() -> assert_cmd::Command {
fn hyperfine_runs_successfully() {
hyperfine()
.arg("--runs=2")
- .arg("echo 'dummy benchmark'")
+ .arg("echo dummy benchmark")
.assert()
.success();
}
@@ -26,7 +26,7 @@ fn hyperfine_runs_successfully() {
fn at_least_two_runs_are_required() {
hyperfine()
.arg("--runs=1")
- .arg("echo 'dummy benchmark'")
+ .arg("echo dummy benchmark")
.assert()
.failure();
}
@@ -59,7 +59,7 @@ impl ExecutionOrderTest {
fn get_command(&self, output: &str) -> String {
format!(
- "echo '{output}' >> {path}",
+ "echo {output} >> {path}",
output = output,
path = self.logfile_path.to_string_lossy()
)
@@ -82,6 +82,12 @@ impl ExecutionOrderTest {
fn expect_output(&mut self, output: &str) -> &mut Self {
self.expected_content.push_str(output);
+
+ #[cfg(windows)]
+ {
+ self.expected_content.push_str(" \r");
+ }
+
self.expected_content.push('\n');
self
}