We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c37045 commit 98c7020Copy full SHA for 98c7020
test/test_rdoc_ruby_lex.rb
@@ -286,6 +286,24 @@ def test_class_tokenize_percent_w_quote
286
assert_equal expected, tokens
287
end
288
289
+ def test_class_tokenize_hash_rocket
290
+ tokens = RDoc::RubyLex.tokenize "{ :foo=> 1 }", nil
291
+
292
+ expected = [
293
+ @TK::TkLBRACE .new( 0, 1, 0, '{'),
294
+ @TK::TkSPACE .new( 1, 1, 1, ' '),
295
+ @TK::TkSYMBOL .new( 2, 1, 2, ':foo'),
296
+ @TK::TkHASHROCKET.new( 6, 1, 6, '=>'),
297
+ @TK::TkSPACE .new( 8, 1, 8, ' '),
298
+ @TK::TkINTEGER .new( 9, 1, 9, '1'),
299
+ @TK::TkSPACE .new(10, 1, 10, ' '),
300
+ @TK::TkRBRACE .new(11, 1, 11, '}'),
301
+ @TK::TkNL .new(12, 1, 12, "\n")
302
+ ]
303
304
+ assert_equal expected, tokens
305
+ end
306
307
def test_class_tokenize_regexp
308
tokens = RDoc::RubyLex.tokenize "/hay/", nil
309
0 commit comments