Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cre4ture committed Jan 14, 2024
1 parent c92af05 commit 3a443b7
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions tests/by-util/test_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,14 @@ fn test_fail_change_directory() {
}

fn modify_newlines_according_platform(input: &str) -> String {
#[cfg(target_os="windows")]
{ input.replace("\n", "\r\n") }
#[cfg(not(target_os="windows"))]
{ input.into() }
#[cfg(target_os = "windows")]
{
input.replace("\n", "\r\n")
}
#[cfg(not(target_os = "windows"))]
{
input.into()
}
}

#[test]
Expand Down Expand Up @@ -288,7 +292,10 @@ fn test_split_string_into_args_s_escaping_challenge() {
.args(&[r#"-S echo "hello \"great\" world""#])
.succeeds()
.stdout_move_str();
assert_eq!(out, modify_newlines_according_platform("hello \"great\" world\n"));
assert_eq!(
out,
modify_newlines_according_platform("hello \"great\" world\n")
);
}

#[test]
Expand Down

0 comments on commit 3a443b7

Please sign in to comment.