aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authortheo-squadracer <92919588+theo-squadracer@users.noreply.github.com>2023-09-05 02:37:26 +0200
committergit <svn-admin@ruby-lang.org>2023-09-05 00:37:30 +0000
commita14ba622da01c7774d0fb285b183097d19e3675e (patch)
tree55fd7fc9d32876584906996a21259fbfd82ebb1c /test
parentdb3b814cb0ff6ffe83fe0c4f66cd6ce8951c3ca7 (diff)
downloadruby-a14ba622da01c7774d0fb285b183097d19e3675e.tar.gz
[ruby/rdoc] handle symbols declared with `%s`
https://github.com/ruby/rdoc/commit/ed91c4b784
Diffstat (limited to 'test')
-rw-r--r--test/rdoc/test_rdoc_parser_ruby.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_parser_ruby.rb b/test/rdoc/test_rdoc_parser_ruby.rb
index aea923765c..1f75ba7c6e 100644
--- a/test/rdoc/test_rdoc_parser_ruby.rb
+++ b/test/rdoc/test_rdoc_parser_ruby.rb
@@ -3205,6 +3205,14 @@ RUBY
assert_nil @parser.parse_symbol_in_arg
end
+ def test_parse_percent_symbol
+ content = '%s[foo bar]'
+ util_parser content
+ tk = @parser.get_tk
+ assert_equal :on_symbol, tk[:kind]
+ assert_equal content, tk[:text]
+ end
+
def test_parse_statements_alias_method
content = <<-CONTENT
class A