diff options
author | Kevin Newton <kddnewton@gmail.com> | 2023-09-27 12:22:36 -0400 |
---|---|---|
committer | Kevin Newton <kddnewton@gmail.com> | 2023-09-27 13:57:38 -0400 |
commit | 8ab56869a64fdccc094f4a83c6367fb23b72d38b (patch) | |
tree | 46ef2bd5c51d5b7f923eda6a60edefc7a08200db /test/prism/ripper_compat_test.rb | |
parent | 7e0971eb5d679bb6219abb0ec238139aa6502c5a (diff) | |
download | ruby-8ab56869a64fdccc094f4a83c6367fb23b72d38b.tar.gz |
Rename YARP filepaths to prism filepaths
Diffstat (limited to 'test/prism/ripper_compat_test.rb')
-rw-r--r-- | test/prism/ripper_compat_test.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/prism/ripper_compat_test.rb b/test/prism/ripper_compat_test.rb new file mode 100644 index 0000000000..9fcdfe63c6 --- /dev/null +++ b/test/prism/ripper_compat_test.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +require_relative "test_helper" + +module YARP + class RipperCompatTest < TestCase + def test_1_plus_2 + assert_equivalent("1 + 2") + end + + def test_2_minus_3 + assert_equivalent("2 - 3") + end + + private + + def assert_equivalent(source) + assert_equal Ripper.sexp_raw(source), RipperCompat.sexp_raw(source) + end + end +end |