diff options
author | Kevin Newton <kddnewton@gmail.com> | 2023-11-15 23:26:53 -0500 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-11-16 17:39:40 +0000 |
commit | ce853559310c1c0ae0c37521a18b0ba402c48a1b (patch) | |
tree | bb978c123315b61a1b1d9c80503de90651739e64 /test/prism/encoding_test.rb | |
parent | 4b2915f0b9f11d965f3c5185c06e23b56ddff78b (diff) | |
download | ruby-ce853559310c1c0ae0c37521a18b0ba402c48a1b.tar.gz |
[ruby/prism] Only run encoding tests on CRuby
https://github.com/ruby/prism/commit/a63acc0629
Diffstat (limited to 'test/prism/encoding_test.rb')
-rw-r--r-- | test/prism/encoding_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/prism/encoding_test.rb b/test/prism/encoding_test.rb index c9a754d047..8d0ff4ce28 100644 --- a/test/prism/encoding_test.rb +++ b/test/prism/encoding_test.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +return if RUBY_ENGINE != "ruby" + require_relative "test_helper" module Prism @@ -85,7 +87,6 @@ module Prism assert_equal Encoding.find("ascii-8bit"), actual end - def test_emacs_style result = Prism.parse("# -*- coding: utf-8 -*-\n'string'") actual = result.value.statements.body.first.unescaped.encoding @@ -200,7 +201,7 @@ module Prism range.each do |codepoint| character = codepoint.chr(encoding) - + if character.match?(/[[:alpha:]]/) if character.match?(/[[:upper:]]/) assert_encoding_constant(name, character) |