Skip to content

Commit 2e1aaf5

Browse files
authored
Merge pull request #3691 from Earlopain/test-parse.y
Test against parse.y
2 parents 17a6a19 + 98e1cd5 commit 2e1aaf5

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

.github/workflows/cruby-bindings.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ on:
1212

1313
jobs:
1414
test-all:
15+
strategy:
16+
matrix:
17+
# Some tests in this repository are only run against parse.y
18+
# We test them here in order to not fail ruby/ruby CI.
19+
parser:
20+
- prism
21+
- parse.y
22+
1523
runs-on: ubuntu-24.04
1624
steps:
1725
- name: Set up latest ruby head
@@ -39,9 +47,11 @@ jobs:
3947
run: |
4048
ruby tool/downloader.rb -d tool -e gnu config.guess config.sub
4149
autoconf
42-
./configure -C --disable-install-doc
50+
./configure -C --disable-install-doc --with-parser=${{ matrix.parser }}
4351
make -j$(nproc)
4452
working-directory: ruby/ruby
4553
- name: make test-all
54+
env:
55+
RUN_OPTS: --parser=${{ matrix.parser }}
4656
run: make -j$(nproc) -s test-all
4757
working-directory: ruby/ruby

test/prism/fixtures_test.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ class FixturesTest < TestCase
2828
except << "3.4/circular_parameters.txt"
2929
end
3030

31+
# Valid only on Ruby 3.3
32+
except << "3.3-3.3/block_args_in_array_assignment.txt"
33+
except << "3.3-3.3/it_with_ordinary_parameter.txt"
34+
except << "3.3-3.3/keyword_args_in_array_assignment.txt"
35+
except << "3.3-3.3/return_in_sclass.txt"
36+
3137
# Leaving these out until they are supported by parse.y.
3238
except << "3.5/leading_logical.txt"
3339
except << "3.5/endless_methods_command_call.txt"

test/prism/locals_test.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ class LocalsTest < TestCase
3131
# CRuby is eliminating dead code.
3232
"whitequark/ruby_bug_10653.txt",
3333

34+
# Valid only on Ruby 3.3
35+
"3.3-3.3/block_args_in_array_assignment.txt",
36+
"3.3-3.3/it_with_ordinary_parameter.txt",
37+
"3.3-3.3/keyword_args_in_array_assignment.txt",
38+
"3.3-3.3/return_in_sclass.txt",
39+
3440
# Leaving these out until they are supported by parse.y.
3541
"3.5/leading_logical.txt",
3642
"3.5/endless_methods_command_call.txt",

0 commit comments

Comments
 (0)