1require 'rdoc/test_case' 2 3class TestRDocMarkupToTtOnly < RDoc::Markup::FormatterTestCase 4 5 add_visitor_tests 6 7 def setup 8 super 9 10 @to = RDoc::Markup::ToTtOnly.new 11 end 12 13 def accept_blank_line 14 assert_empty @to.end_accepting 15 end 16 17 def accept_block_quote 18 assert_empty @to.end_accepting 19 end 20 21 def accept_document 22 assert_equal [], @to.res 23 end 24 25 def accept_heading 26 assert_empty @to.end_accepting 27 end 28 29 def accept_list_end_bullet 30 assert_empty @to.res 31 end 32 33 def accept_list_end_label 34 assert_empty @to.res 35 end 36 37 def accept_list_end_lalpha 38 assert_empty @to.res 39 end 40 41 def accept_list_end_note 42 assert_empty @to.res 43 end 44 45 def accept_list_end_number 46 assert_empty @to.res 47 end 48 49 def accept_list_end_ualpha 50 assert_empty @to.res 51 end 52 53 def accept_list_item_end_bullet 54 assert_empty @to.res 55 end 56 57 def accept_list_item_end_label 58 assert_empty @to.res 59 end 60 61 def accept_list_item_end_lalpha 62 assert_empty @to.res 63 end 64 65 def accept_list_item_end_note 66 assert_empty @to.res 67 end 68 69 def accept_list_item_end_number 70 assert_empty @to.res 71 end 72 73 def accept_list_item_end_ualpha 74 assert_empty @to.res 75 end 76 77 def accept_list_item_start_bullet 78 assert_empty @to.res 79 end 80 81 def accept_list_item_start_label 82 assert_empty @to.res 83 end 84 85 def accept_list_item_start_lalpha 86 assert_empty @to.res 87 end 88 89 def accept_list_item_start_note 90 assert_empty @to.res 91 end 92 93 def accept_list_item_start_number 94 assert_empty @to.res 95 end 96 97 def accept_list_item_start_ualpha 98 assert_empty @to.res 99 end 100 101 def accept_list_start_bullet 102 assert_empty @to.res 103 end 104 105 def accept_list_start_label 106 assert_empty @to.res 107 end 108 109 def accept_list_start_lalpha 110 assert_empty @to.res 111 end 112 113 def accept_list_start_note 114 assert_empty @to.res 115 end 116 117 def accept_list_start_number 118 assert_empty @to.res 119 end 120 121 def accept_list_start_ualpha 122 assert_empty @to.res 123 end 124 125 def accept_paragraph 126 assert_empty @to.end_accepting 127 end 128 129 def accept_paragraph_break 130 assert_empty @to.end_accepting 131 end 132 133 def accept_raw 134 assert_empty @to.end_accepting 135 end 136 137 def accept_rule 138 assert_empty @to.end_accepting 139 end 140 141 def accept_verbatim 142 assert_empty @to.end_accepting 143 end 144 145 def end_accepting 146 assert_equal %w[hi], @to.end_accepting 147 end 148 149 def start_accepting 150 assert_empty @to.end_accepting 151 end 152 153 def accept_heading_1 154 assert_empty @to.end_accepting 155 end 156 157 def accept_heading_2 158 assert_empty @to.end_accepting 159 end 160 161 def accept_heading_3 162 assert_empty @to.end_accepting 163 end 164 165 def accept_heading_4 166 assert_empty @to.end_accepting 167 end 168 169 def accept_heading_indent 170 assert_empty @to.end_accepting 171 end 172 173 def accept_heading_b 174 assert_empty @to.end_accepting 175 end 176 177 def accept_heading_suppressed_crossref 178 assert_empty @to.end_accepting 179 end 180 181 def accept_list_item_start_note_2 182 assert_equal [nil, 'teletype', nil], @to.res 183 end 184 185 def accept_list_item_start_note_multi_description 186 assert_empty @to.res 187 end 188 189 def accept_list_item_start_note_multi_label 190 assert_empty @to.res 191 end 192 193 def accept_paragraph_b 194 assert_empty @to.end_accepting 195 end 196 197 def accept_paragraph_br 198 assert_empty @to.end_accepting 199 end 200 201 def accept_paragraph_i 202 assert_empty @to.end_accepting 203 end 204 205 def accept_paragraph_indent 206 assert_empty @to.end_accepting 207 end 208 209 def accept_paragraph_plus 210 assert_equal %w[teletype], @to.end_accepting 211 end 212 213 def accept_paragraph_star 214 assert_empty @to.end_accepting 215 end 216 217 def accept_paragraph_underscore 218 assert_empty @to.end_accepting 219 end 220 221 def accept_paragraph_wrap 222 assert_empty @to.end_accepting 223 end 224 225 def accept_rule_indent 226 assert_empty @to.end_accepting 227 end 228 229 def accept_verbatim_indent 230 assert_empty @to.end_accepting 231 end 232 233 def accept_verbatim_big_indent 234 assert_empty @to.end_accepting 235 end 236 237 def list_nested 238 assert_empty @to.end_accepting 239 end 240 241 def list_verbatim 242 assert_empty @to.end_accepting 243 end 244 245end 246 247