summaryrefslogtreecommitdiff
path: root/test/prism/ruby/parser_test.rb
diff options
context:
space:
mode:
authorEarlopain <14981592+Earlopain@users.noreply.github.com>2025-12-02 14:41:44 +0100
committergit <svn-admin@ruby-lang.org>2025-12-02 16:20:43 +0000
commit17bcd71e4218994bfb6c2d398fa784ccd74d2f2c (patch)
treef2c1ca8f3364a1275938f8fc0b1f3788a17eb22a /test/prism/ruby/parser_test.rb
parentc06c2203ed14e67dc12486c815b246395ef711e1 (diff)
[ruby/prism] Clean up test excludes
Mostly not having to list version-specific excludes when testing against ripper/parse.y Also don't test new syntax additions against the parser gems. The version support for them may (or may not) be expanded but we shouldn't bother while the ruby version hasn't even released yet. (ruby_parser translation is not versioned, so let as is for now) I also removed excludes that have since been implemented by parse.y https://github.com/ruby/prism/commit/e5a0221c37
Diffstat (limited to 'test/prism/ruby/parser_test.rb')
-rw-r--r--test/prism/ruby/parser_test.rb13
1 files changed, 2 insertions, 11 deletions
diff --git a/test/prism/ruby/parser_test.rb b/test/prism/ruby/parser_test.rb
index 648c44e77a..c972f0962b 100644
--- a/test/prism/ruby/parser_test.rb
+++ b/test/prism/ruby/parser_test.rb
@@ -65,15 +65,6 @@ module Prism
# 1.. && 2
"ranges.txt",
- # https://bugs.ruby-lang.org/issues/20478
- "3.4/circular_parameters.txt",
-
- # Cannot yet handling leading logical operators.
- "4.0/leading_logical.txt",
-
- # Ruby >= 4.0 specific syntax
- "4.0/endless_methods_command_call.txt",
-
# https://bugs.ruby-lang.org/issues/21168#note-5
"command_method_call_2.txt",
]
@@ -148,7 +139,7 @@ module Prism
"whitequark/space_args_block.txt"
]
- Fixture.each(except: skip_syntax_error) do |fixture|
+ Fixture.each_for_version(except: skip_syntax_error, version: "3.3") do |fixture|
define_method(fixture.test_name) do
assert_equal_parses(
fixture,
@@ -171,7 +162,7 @@ module Prism
if RUBY_VERSION >= "3.3"
def test_current_parser_for_current_ruby
- major, minor = current_major_minor.split(".")
+ major, minor = CURRENT_MAJOR_MINOR.split(".")
# Let's just hope there never is a Ruby 3.10 or similar
expected = major.to_i * 10 + minor.to_i
assert_equal(expected, Translation::ParserCurrent.new.version)