File tree 1 file changed +36
-0
lines changed
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,42 @@ def test_class_to_html_empty
39
39
assert_equal '' , RDoc ::TokenStream . to_html ( [ ] )
40
40
end
41
41
42
+ def test_add_tokens
43
+ foo = Class . new do
44
+ include RDoc ::TokenStream
45
+ end . new
46
+ foo . collect_tokens
47
+ foo . add_tokens ( [ :token ] )
48
+ assert_equal [ :token ] , foo . token_stream
49
+ end
50
+
51
+ def test_add_token
52
+ foo = Class . new do
53
+ include RDoc ::TokenStream
54
+ end . new
55
+ foo . collect_tokens
56
+ foo . add_token ( :token )
57
+ assert_equal [ :token ] , foo . token_stream
58
+ end
59
+
60
+ def test_collect_tokens
61
+ foo = Class . new do
62
+ include RDoc ::TokenStream
63
+ end . new
64
+ foo . collect_tokens
65
+ assert_equal [ ] , foo . token_stream
66
+ end
67
+
68
+ def test_pop_token
69
+ foo = Class . new do
70
+ include RDoc ::TokenStream
71
+ end . new
72
+ foo . collect_tokens
73
+ foo . add_token ( :token )
74
+ foo . pop_token
75
+ assert_equal [ ] , foo . token_stream
76
+ end
77
+
42
78
def test_token_stream
43
79
foo = Class . new do
44
80
include RDoc ::TokenStream
You can’t perform that action at this time.
0 commit comments