summaryrefslogtreecommitdiff
path: root/test/ripper
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-15 01:33:31 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-15 11:40:06 +0900
commit2aa6826e81ec880f5e98fa995e44fae0819be95d (patch)
tree4b01025821aab8272edeb54d6c7968bb7655bdac /test/ripper
parent4568ba071107a139b9f02fc17aa12f998181abf1 (diff)
downloadruby-2aa6826e81ec880f5e98fa995e44fae0819be95d.tar.gz
Extract the wrapped value when yydebug [Bug #18075]
Diffstat (limited to 'test/ripper')
-rw-r--r--test/ripper/test_ripper.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ripper/test_ripper.rb b/test/ripper/test_ripper.rb
index ab841b7616..76276c54ef 100644
--- a/test/ripper/test_ripper.rb
+++ b/test/ripper/test_ripper.rb
@@ -75,6 +75,15 @@ class TestRipper::Ripper < Test::Unit::TestCase
assert_include out.string[/.*"local variable or method".*/], 'test_xxxx'
end
+ def test_yydebug_string
+ out = StringIO.new
+ ripper = Ripper.new '"woot"'
+ ripper.yydebug = true
+ ripper.debug_output = out
+ ripper.parse
+ assert_include out.string[/.*"literal content".*/], 'woot'
+ end
+
def test_regexp_with_option
bug11932 = '[ruby-core:72638] [Bug #11932]'
src = '/[\xC0-\xF0]/u'.dup.force_encoding(Encoding::UTF_8)