From 05697bac75d44e9100226e368b20138f1634d1fc Mon Sep 17 00:00:00 2001 From: Alexandre Nicolaie Date: Sun, 4 Aug 2024 18:36:11 +0000 Subject: [PATCH] :white_check_mark:(core): Handle CRLF output on windows platform Signed-off-by: Alexandre Nicolaie --- tests/cli.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/cli.rs b/tests/cli.rs index 9c98c6a..5f34893 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -50,6 +50,8 @@ fn generate_with_empty_namespace() -> Result<(), Box> { fn generate_on_stdout() -> Result<(), Box> { let mut cmd = Command::cargo_bin("kubevault")?; let expect = fs::read_to_string("tests/fixtures/manifests.yaml")?; + #[cfg(windows)] + let expect = expect.replace("\n", "\r\n"); cmd.arg("generate") .arg("--vault-dir") @@ -64,6 +66,8 @@ fn generate_on_stdout() -> Result<(), Box> { fn generate_on_stdout_with_custom_namespace() -> Result<(), Box> { let mut cmd = Command::cargo_bin("kubevault")?; let expect = fs::read_to_string("tests/fixtures/manifests_default.yaml")?; + #[cfg(windows)] + let expect = expect.replace("\n", "\r\n"); cmd.arg("generate") .arg("--vault-dir")