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 6d5a5c7 commit 0dd8527Copy full SHA for 0dd8527
internal/compiler/tests/syntax_tests.rs
@@ -170,6 +170,14 @@ fn extract_expected_diags(source: &str) -> Vec<ExpectedDiagnostic> {
170
}
171
172
173
+ // Windows edge-case, if the end falls on a newline, it should span the entire
174
+ // newline character, which is two characters, not one.
175
+ if let Some(end_offset) = end {
176
+ if source.get(end_offset..=(end_offset + 1)) == Some("\r\n") {
177
+ end = Some(end_offset + 1)
178
+ };
179
+ }
180
+
181
let expected_diag_level = match warning_or_error {
182
"warning" => DiagnosticLevel::Warning,
183
"error" => DiagnosticLevel::Error,
0 commit comments