diff options
author | Kevin Newton <kddnewton@gmail.com> | 2023-09-15 12:30:17 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-09-15 22:59:48 +0000 |
commit | 1be64e34d0881e5c66be51a892bcd3a056e8f5f0 (patch) | |
tree | 76793914f7d0f05a7c61826573d41fbda0f353ea /test/yarp | |
parent | 18780c22f657be2a0251fbf174fb46fd8523fae7 (diff) | |
download | ruby-1be64e34d0881e5c66be51a892bcd3a056e8f5f0.tar.gz |
[ruby/yarp] Alnum cannot be %-literal delimiters
https://github.com/ruby/yarp/commit/4ba6d5ca70
Diffstat (limited to 'test/yarp')
-rw-r--r-- | test/yarp/errors_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/yarp/errors_test.rb b/test/yarp/errors_test.rb index 54cbda14d1..41cb6b7f47 100644 --- a/test/yarp/errors_test.rb +++ b/test/yarp/errors_test.rb @@ -1255,6 +1255,20 @@ module YARP assert_error_messages "0x1_1_", error_messages end + def test_alnum_delimiters + error_messages = ["Invalid `%` token"] + + assert_error_messages "%qXfooX", error_messages + assert_error_messages "%QXfooX", error_messages + assert_error_messages "%wXfooX", error_messages + assert_error_messages "%WxfooX", error_messages + assert_error_messages "%iXfooX", error_messages + assert_error_messages "%IXfooX", error_messages + assert_error_messages "%xXfooX", error_messages + assert_error_messages "%rXfooX", error_messages + assert_error_messages "%sXfooX", error_messages + end + private def assert_errors(expected, source, errors, compare_ripper: RUBY_ENGINE == "ruby") |