From 65fa58d3aef07b09d8a2b6724ac2ea4b2d61610a Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:45:26 +0100 Subject: [PATCH] [ruby/prism] Mark some parser translator tests as being known failures Without a change from `parser`, this is impossible to correctly handle. https://github.com/ruby/prism/commit/ca1d44e808 --- test/prism/ruby/parser_test.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/prism/ruby/parser_test.rb b/test/prism/ruby/parser_test.rb index fae8ec8dec..cff36f56b0 100644 --- a/test/prism/ruby/parser_test.rb +++ b/test/prism/ruby/parser_test.rb @@ -72,15 +72,20 @@ module Prism # Contains an escaped multibyte character. This is supposed to drop to backslash "seattlerb/regexp_escape_extended.txt", + + # https://github.com/whitequark/parser/issues/1020 + # These contain consecutive \r characters, followed by \n. Prism only receives + # the already modified source buffer which dropped one \r but must know the + # original code to parse it correctly. + "seattlerb/heredoc_with_extra_carriage_returns_windows.txt", + "seattlerb/heredoc_with_only_carriage_returns_windows.txt", + "seattlerb/heredoc_with_only_carriage_returns.txt", ] # These files are either failing to parse or failing to translate, so we'll # skip them for now. skip_all = skip_incorrect | [ "unescaping.txt", - "seattlerb/heredoc_with_extra_carriage_returns_windows.txt", - "seattlerb/heredoc_with_only_carriage_returns_windows.txt", - "seattlerb/heredoc_with_only_carriage_returns.txt", "seattlerb/pctW_lineno.txt", "seattlerb/regexp_esc_C_slash.txt", "unparser/corpus/literal/literal.txt",