We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6af6dc commit 8818370Copy full SHA for 8818370
internal/compiler/tests/syntax_tests.rs
@@ -168,6 +168,14 @@ fn extract_expected_diags(source: &str) -> Vec<ExpectedDiagnostic> {
168
}
169
170
171
+ // Windows edge-case, if the end falls on a newline, it should span the entire
172
+ // newline character, which is two characters, not one.
173
+ if let Some(end_offset) = end {
174
+ if source.get(end_offset..=(end_offset + 1)) == Some("\r\n") {
175
+ end = Some(end_offset + 1)
176
+ };
177
+ }
178
+
179
let expected_diag_level = match warning_or_error {
180
"warning" => DiagnosticLevel::Warning,
181
"error" => DiagnosticLevel::Error,
0 commit comments