diff options
| author | Earlopain <14981592+Earlopain@users.noreply.github.com> | 2026-01-16 11:52:39 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2026-01-16 12:07:41 +0000 |
| commit | 074a23ab77a94a5388958c573ab33d5ea5a46ecc (patch) | |
| tree | 69cf5142834accbba6adc224176120d663a4eadb /test | |
| parent | f872901bb263e01768ac64e6d063377c3b633e27 (diff) | |
[ruby/prism] Add `Ripper.tokenize` to translation layer
It's public API and trivial to implement.
https://github.com/ruby/prism/commit/e77545f8b5
Diffstat (limited to 'test')
| -rw-r--r-- | test/prism/ruby/ripper_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/prism/ruby/ripper_test.rb b/test/prism/ruby/ripper_test.rb index 2bd9c2fe4a..cac20a073d 100644 --- a/test/prism/ruby/ripper_test.rb +++ b/test/prism/ruby/ripper_test.rb @@ -84,6 +84,11 @@ module Prism define_method("#{fixture.test_name}_lexer_parse") { assert_ripper_lexer_parse(fixture.read) } end + def test_tokenize + source = "foo;1;BAZ" + assert_equal(Ripper.tokenize(source), Translation::Ripper.tokenize(source)) + end + # Check that the hardcoded values don't change without us noticing. def test_internals actual = Translation::Ripper.constants.select { |name| name.start_with?("EXPR_") }.sort |
