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 21, 2023
1 parent f0ff0bf commit cf39830
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 @@ -1102,7 +1102,7 @@ if True:
if True:
pass
"#
.trim()
.trim().replace("\n", LineEnding::default().as_str())
);
}

Expand Down Expand Up @@ -1152,7 +1152,7 @@ if True:
round_trip_with(
&Indentation::new(" ".to_string()),
&Quote::default(),
&LineEnding::default(),
&LineEnding::LF(),
r#"
if True:
pass
Expand All @@ -1163,13 +1163,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 @@ -1180,7 +1180,7 @@ if True:
if True:
pass
"#
.trim()
.trim().replace("\n", LineEnding::default().as_str())
);
assert_eq!(
round_trip_with(
Expand All @@ -1197,7 +1197,7 @@ if True:
if True:
pass
"#
.trim()
.trim().replace("\n", LineEnding::default().as_str())
);
}

Expand Down

0 comments on commit cf39830

Please sign in to comment.