aboutsummaryrefslogtreecommitdiffstats
path: root/test/prism/ruby_api_test.rb
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2023-09-27 12:24:48 -0400
committerKevin Newton <kddnewton@gmail.com>2023-09-27 13:57:38 -0400
commit4f73a7c2f7ff16aa78cf0dec2d4c7f90a2c41c9b (patch)
tree3b6f0cedc858d46d30a28c6d03439d653884a915 /test/prism/ruby_api_test.rb
parent8ab56869a64fdccc094f4a83c6367fb23b72d38b (diff)
downloadruby-4f73a7c2f7ff16aa78cf0dec2d4c7f90a2c41c9b.tar.gz
Sync to prism rename commits
Diffstat (limited to 'test/prism/ruby_api_test.rb')
-rw-r--r--test/prism/ruby_api_test.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/prism/ruby_api_test.rb b/test/prism/ruby_api_test.rb
index dc12012f44..a6ce976a85 100644
--- a/test/prism/ruby_api_test.rb
+++ b/test/prism/ruby_api_test.rb
@@ -2,19 +2,19 @@
require_relative "test_helper"
-module YARP
+module Prism
class RubyAPITest < TestCase
def test_ruby_api
filepath = __FILE__
source = File.read(filepath, binmode: true, external_encoding: Encoding::UTF_8)
- assert_equal YARP.lex(source, filepath).value, YARP.lex_file(filepath).value
- assert_equal YARP.dump(source, filepath), YARP.dump_file(filepath)
+ assert_equal Prism.lex(source, filepath).value, Prism.lex_file(filepath).value
+ assert_equal Prism.dump(source, filepath), Prism.dump_file(filepath)
- serialized = YARP.dump(source, filepath)
- ast1 = YARP.load(source, serialized).value
- ast2 = YARP.parse(source, filepath).value
- ast3 = YARP.parse_file(filepath).value
+ serialized = Prism.dump(source, filepath)
+ ast1 = Prism.load(source, serialized).value
+ ast2 = Prism.parse(source, filepath).value
+ ast3 = Prism.parse_file(filepath).value
assert_equal_nodes ast1, ast2
assert_equal_nodes ast2, ast3
@@ -58,7 +58,7 @@ module YARP
private
def parse_expression(source)
- YARP.parse(source).value.statements.body.first
+ Prism.parse(source).value.statements.body.first
end
end
end