Skip to content

Commit

Permalink
* add tests for kwopt+kwrest arguments and forwarded_kwrestarg. (#913)
Browse files Browse the repository at this point in the history
  • Loading branch information
iliabylich committed Mar 7, 2023
1 parent ff6f75a commit 2d23044
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/test_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11133,4 +11133,19 @@ def test_multiple_pattern_matches
%q{},
SINCE_3_1)
end

def test_kwoptarg_with_kwrestarg_and_forwarded_args
assert_parses(
s(:def, :f,
s(:args,
s(:kwoptarg, :a,
s(:nil)),
s(:kwrestarg)),
s(:send, nil, :b,
s(:kwargs,
s(:forwarded_kwrestarg)))),
%Q{def f(a: nil, **); b(**) end},
%q{},
SINCE_3_2)
end
end

0 comments on commit 2d23044

Please sign in to comment.