diff options
author | Kevin Newton <kddnewton@gmail.com> | 2023-11-02 12:48:19 -0400 |
---|---|---|
committer | Kevin Newton <kddnewton@gmail.com> | 2023-11-03 10:13:49 -0400 |
commit | ca7297efd389eca792c706326d1af138acf5a4f6 (patch) | |
tree | d5dec73cc4aeef484e820493dd4e18d85a64fb72 /test/prism/ruby_api_test.rb | |
parent | 2a0f2b776325f949ba6d311b0d90cbaaea825b63 (diff) | |
download | ruby-ca7297efd389eca792c706326d1af138acf5a4f6.tar.gz |
[ruby/prism] Wire up options through the Ruby API
https://github.com/ruby/prism/commit/8582d372a3
Diffstat (limited to 'test/prism/ruby_api_test.rb')
-rw-r--r-- | test/prism/ruby_api_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/prism/ruby_api_test.rb b/test/prism/ruby_api_test.rb index a6ce976a85..efe8bc1c1b 100644 --- a/test/prism/ruby_api_test.rb +++ b/test/prism/ruby_api_test.rb @@ -8,12 +8,12 @@ module Prism filepath = __FILE__ source = File.read(filepath, binmode: true, external_encoding: Encoding::UTF_8) - assert_equal Prism.lex(source, filepath).value, Prism.lex_file(filepath).value - assert_equal Prism.dump(source, filepath), Prism.dump_file(filepath) + assert_equal Prism.lex(source, filepath: filepath).value, Prism.lex_file(filepath).value + assert_equal Prism.dump(source, filepath: filepath), Prism.dump_file(filepath) - serialized = Prism.dump(source, filepath) + serialized = Prism.dump(source, filepath: filepath) ast1 = Prism.load(source, serialized).value - ast2 = Prism.parse(source, filepath).value + ast2 = Prism.parse(source, filepath: filepath).value ast3 = Prism.parse_file(filepath).value assert_equal_nodes ast1, ast2 |