Skip to content

Commit

Permalink
✅(core): Handle CRLF output on windows platform
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Nicolaie <[email protected]>
  • Loading branch information
xunleii committed Aug 4, 2024
1 parent 74ae9f6 commit 05697ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ fn generate_with_empty_namespace() -> Result<(), Box<dyn std::error::Error>> {
fn generate_on_stdout() -> Result<(), Box<dyn std::error::Error>> {
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")
Expand All @@ -64,6 +66,8 @@ fn generate_on_stdout() -> Result<(), Box<dyn std::error::Error>> {
fn generate_on_stdout_with_custom_namespace() -> Result<(), Box<dyn std::error::Error>> {
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")
Expand Down

0 comments on commit 05697ba

Please sign in to comment.