summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2023-11-08 14:49:58 -0300
committerJemma Issroff <jemmaissroff@gmail.com>2023-11-08 18:15:47 -0300
commitf9e34a1fd3387822903ff7a63405bf116e0c9803 (patch)
treed63d317bad1050e5fde4df14d895d434322b1d9b /test/ruby
parent70e4ff9feb9e5f7254f9dbe955dedbf56e73c8d5 (diff)
[PRISM] Add tests for OptionalKeywordParameterNode
This commit adds tests for the compilation of the OptionalKeywordParameterNode, and fixes cases on the RequiredKeywordParameterNode
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_compile_prism.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb
index 2661bd5bea..aa2dd84600 100644
--- a/test/ruby/test_compile_prism.rb
+++ b/test/ruby/test_compile_prism.rb
@@ -917,6 +917,10 @@ module Prism
assert_prism_eval("def prism_test_optional_param_node(bar = nil); end")
end
+ def test_OptionalKeywordParameterNode
+ assert_prism_eval("def prism_test_optional_keyword_param_node(bar: nil); end")
+ end
+
def test_ParametersNode
assert_prism_eval("def prism_test_parameters_node(bar, baz); end")
assert_prism_eval("def prism_test_parameters_node(a, b = 2); end")