Skip to content

Commit

Permalink
fix: use platform-specific literal newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrugman committed Jan 24, 2023
1 parent a6faa06 commit 36fc06d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/source_code/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ if True:
if True:
pass
"#
.trim()
.trim().replace("\n", LineEnding::default().as_str())
);
}

Expand Down Expand Up @@ -1242,7 +1242,7 @@ if True:
round_trip_with(
&Indentation::new(" ".to_string()),
&Quote::default(),
&LineEnding::default(),
&LineEnding::LF(),
r#"
if True:
pass
Expand All @@ -1253,13 +1253,13 @@ if True:
if True:
pass
"#
.trim()
.trim().replace("\n", LineEnding::default().as_str())
);
assert_eq!(
round_trip_with(
&Indentation::new(" ".to_string()),
&Quote::default(),
&LineEnding::default(),
&LineEnding::LF(),
r#"
if True:
pass
Expand All @@ -1270,7 +1270,7 @@ if True:
if True:
pass
"#
.trim()
.trim().replace("\n", LineEnding::default().as_str())
);
assert_eq!(
round_trip_with(
Expand All @@ -1287,7 +1287,7 @@ if True:
if True:
pass
"#
.trim()
.trim().replace("\n", LineEnding::default().as_str())
);
}

Expand Down

0 comments on commit 36fc06d

Please sign in to comment.