summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2023-11-07 19:28:21 -0300
committerJemma Issroff <jemmaissroff@gmail.com>2023-11-08 18:15:47 -0300
commit70e4ff9feb9e5f7254f9dbe955dedbf56e73c8d5 (patch)
treefa814b521ffcb0af8028b031e4392b1ecc2547fb /test/ruby
parent26cff6ae2b7fe2259f942d1cf411c5af891b1de9 (diff)
[PRISM] Added tests for ForwardingParameterNode, KeywordRestParameterNode
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_compile_prism.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb
index e94b256119..2661bd5bea 100644
--- a/test/ruby/test_compile_prism.rb
+++ b/test/ruby/test_compile_prism.rb
@@ -900,6 +900,14 @@ module Prism
assert_prism_eval("[1].map { |a; b| b = 2; a + b}")
end
+ def test_FowardingParameterNode
+ assert_prism_eval("def prism_test_forwarding_parameter_node(...); end")
+ end
+
+ def test_KeywordRestParameterNode
+ assert_prism_eval("def prism_test_keyword_rest_parameter_node(a, **b); end")
+ end
+
def test_NoKeywordsParameterNode
assert_prism_eval("def prism_test_no_keywords(**nil); end")
assert_prism_eval("def prism_test_no_keywords(a, b = 2, **nil); end")