docgenerator 2.1.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (324) hide show
  1. checksums.yaml +4 -4
  2. data/lib/docgenerator.rb +18 -18
  3. data/lib/docgenerator/characters.rb +1 -0
  4. data/lib/docgenerator/css.rb +5 -0
  5. data/lib/docgenerator/document.rb +7 -2
  6. data/lib/docgenerator/element.rb +2 -2
  7. data/lib/docgenerator/elements.rb +69 -2
  8. data/lib/docgenerator/index.rb +1 -1
  9. data/lib/docgenerator/packages/listings.rb +94 -94
  10. data/lib/docgenerator/packages/multicol.rb +1 -1
  11. data/lib/docgenerator/packages/pdfpages.rb +2 -1
  12. data/lib/docgenerator/packages/rubycode4doc.rb +173 -172
  13. data/lib/docgenerator/packages/struktex.rb +395 -379
  14. data/lib/docgenerator/packages/todonotes.rb +2 -2
  15. data/lib/docgenerator/packages/url.rb +4 -0
  16. data/lib/docgenerator/sections.rb +24 -2
  17. data/lib/docgenerator/tabular.rb +59 -14
  18. data/lib/docgenerator/templates/docgenerator_template.rb +1 -0
  19. data/lib/docgenerator/templates/docgenerator_template.yaml +30 -1
  20. data/lib/docgenerator/version.rb +13 -1
  21. data/meta_test_and_doc/build__meta.rb +3 -10
  22. data/meta_test_and_doc/build_doc.rb +4 -2
  23. data/meta_test_and_doc/build_test.rb +21 -17
  24. data/meta_test_and_doc/manpages/images.rb +152 -0
  25. data/unittest/expected/test_document_toc_article.latex +6 -6
  26. data/unittest/expected_struktex/test_struktex_krug.creole +5 -5
  27. data/unittest/expected_struktex/test_struktex_krug.wiki +5 -5
  28. data/unittest/expected_struktex/test_struktex_statement.creole +4 -4
  29. data/unittest/expected_struktex/test_struktex_statement.wiki +4 -4
  30. data/unittest/expected_templates/test_report_utf8.tex +34 -0
  31. data/unittest/expected_templates/test_standalone.tex +2 -1
  32. data/unittest/unittest_docgenerator.rb +37 -30
  33. data/unittest/unittest_docgenerator_characters.rb +113 -60
  34. data/unittest/unittest_docgenerator_runtex.rb +16 -12
  35. data/unittest/unittest_packages_multicol.rb +4 -9
  36. data/unittest/unittest_packages_struktex.rb +66 -90
  37. data/unittest/unittest_rubycode4doc.rb +38 -241
  38. data/unittest/unittest_templates.rb +4 -8
  39. metadata +23 -560
  40. data/examples/creole_example.rb +0 -81
  41. data/examples/creole_example_footnote.rb +0 -67
  42. data/examples/creole_example_new_plugin.rb +0 -51
  43. data/examples/creole_example_placeholder.rb +0 -77
  44. data/examples/creole_example_rail.rb +0 -154
  45. data/examples/creole_example_rubycode.rb +0 -144
  46. data/examples/creole_example_struktex.rb +0 -169
  47. data/examples/creole_example_tabular.rb +0 -97
  48. data/examples/wiki2docgenerator_example.rb +0 -299
  49. data/lib/creole/creole2doc.rb +0 -954
  50. data/lib/creole/creole_characters.rb +0 -120
  51. data/lib/creole/creole_inclusion_and_plugins.rb +0 -96
  52. data/lib/creole/creole_inclusions.rb +0 -154
  53. data/lib/creole/creole_placeholder.rb +0 -171
  54. data/lib/creole/creole_plugins.rb +0 -230
  55. data/lib/creole/creole_tabular.rb +0 -401
  56. data/lib/creole/plugins/rail.rb +0 -181
  57. data/lib/creole/plugins/rubycode4creole.rb +0 -136
  58. data/lib/creole/plugins/struktex.rb +0 -59
  59. data/lib/creole/plugins/todonotes.rb +0 -77
  60. data/lib/wiki2doc/plugins/rubycode4wiki.rb +0 -53
  61. data/lib/wiki2doc/plugins/struktex.rb +0 -12
  62. data/lib/wiki2doc/wiki2docgenerator.rb +0 -1276
  63. data/lib/wiki2doc/wikimedia_document.rb +0 -24
  64. data/meta_test_and_doc/manpages/packages.rb +0 -13
  65. data/unittest/Red_Flower.jpg +0 -0
  66. data/unittest/creole1.0test.txt +0 -128
  67. data/unittest/creole_testtext.creole +0 -11
  68. data/unittest/expected_creole/test_creole.html +0 -3
  69. data/unittest/expected_creole/test_creole_characters_all.creole +0 -28
  70. data/unittest/expected_creole/test_creole_characters_all.html +0 -18
  71. data/unittest/expected_creole/test_creole_characters_all.latex +0 -36
  72. data/unittest/expected_creole/test_creole_characters_special.html +0 -10
  73. data/unittest/expected_creole/test_creole_characters_special.latex +0 -18
  74. data/unittest/expected_creole/test_creole_comment.context +0 -11
  75. data/unittest/expected_creole/test_creole_comment.creole +0 -12
  76. data/unittest/expected_creole/test_creole_comment.html +0 -9
  77. data/unittest/expected_creole/test_creole_comment.latex +0 -11
  78. data/unittest/expected_creole/test_creole_countdown.html +0 -3
  79. data/unittest/expected_creole/test_creole_countdown.latex +0 -4
  80. data/unittest/expected_creole/test_creole_creole1.0test.html +0 -182
  81. data/unittest/expected_creole/test_creole_creole1.0test.latex +0 -253
  82. data/unittest/expected_creole/test_creole_creole1.0test.text +0 -160
  83. data/unittest/expected_creole/test_creole_footnotes.html +0 -9
  84. data/unittest/expected_creole/test_creole_footnotes.latex +0 -14
  85. data/unittest/expected_creole/test_creole_footnotes_groupid.html +0 -15
  86. data/unittest/expected_creole/test_creole_footnotes_label.html +0 -9
  87. data/unittest/expected_creole/test_creole_headings.html +0 -17
  88. data/unittest/expected_creole/test_creole_headings.latex +0 -19
  89. data/unittest/expected_creole/test_creole_headings.text +0 -48
  90. data/unittest/expected_creole/test_creole_headings.wiki +0 -37
  91. data/unittest/expected_creole/test_creole_hr.html +0 -7
  92. data/unittest/expected_creole/test_creole_hr.latex +0 -9
  93. data/unittest/expected_creole/test_creole_hr.text +0 -4
  94. data/unittest/expected_creole/test_creole_ignore.html +0 -3
  95. data/unittest/expected_creole/test_creole_ignore.latex +0 -4
  96. data/unittest/expected_creole/test_creole_ignore.text +0 -2
  97. data/unittest/expected_creole/test_creole_inline.html +0 -3
  98. data/unittest/expected_creole/test_creole_inline.latex +0 -4
  99. data/unittest/expected_creole/test_creole_inline.text +0 -2
  100. data/unittest/expected_creole/test_creole_inline_apostroph.html +0 -6
  101. data/unittest/expected_creole/test_creole_inline_apostroph.latex +0 -8
  102. data/unittest/expected_creole/test_creole_inline_apostroph.text +0 -4
  103. data/unittest/expected_creole/test_creole_inline_ruby.html +0 -12
  104. data/unittest/expected_creole/test_creole_inline_ruby.latex +0 -20
  105. data/unittest/expected_creole/test_creole_inline_ruby_raw.html +0 -6
  106. data/unittest/expected_creole/test_creole_inline_ruby_raw.latex +0 -8
  107. data/unittest/expected_creole/test_creole_input.normsource +0 -25
  108. data/unittest/expected_creole/test_creole_input.normsource_1.8 +0 -23
  109. data/unittest/expected_creole/test_creole_input_file_simple.html +0 -15
  110. data/unittest/expected_creole/test_creole_input_file_simple_readlines.html +0 -15
  111. data/unittest/expected_creole/test_creole_label.html +0 -12
  112. data/unittest/expected_creole/test_creole_label.latex +0 -15
  113. data/unittest/expected_creole/test_creole_line_break.html +0 -6
  114. data/unittest/expected_creole/test_creole_line_break.latex +0 -8
  115. data/unittest/expected_creole/test_creole_links_explicit_internal.html +0 -6
  116. data/unittest/expected_creole/test_creole_links_explicit_internal.text +0 -4
  117. data/unittest/expected_creole/test_creole_links_explicit_with_em.html +0 -3
  118. data/unittest/expected_creole/test_creole_links_explicit_with_em.latex +0 -4
  119. data/unittest/expected_creole/test_creole_links_explicit_with_em.text +0 -2
  120. data/unittest/expected_creole/test_creole_links_external.html +0 -6
  121. data/unittest/expected_creole/test_creole_links_external.latex +0 -8
  122. data/unittest/expected_creole/test_creole_links_external.text +0 -4
  123. data/unittest/expected_creole/test_creole_links_external_implicit.html +0 -9
  124. data/unittest/expected_creole/test_creole_links_external_implicit.latex +0 -12
  125. data/unittest/expected_creole/test_creole_links_external_implicit.text +0 -6
  126. data/unittest/expected_creole/test_creole_links_file.html +0 -6
  127. data/unittest/expected_creole/test_creole_links_file.latex +0 -8
  128. data/unittest/expected_creole/test_creole_links_file.text +0 -4
  129. data/unittest/expected_creole/test_creole_links_implicit_end.creole +0 -4
  130. data/unittest/expected_creole/test_creole_links_implicit_end.html +0 -3
  131. data/unittest/expected_creole/test_creole_links_implicit_end.latex +0 -4
  132. data/unittest/expected_creole/test_creole_list_ol.html +0 -12
  133. data/unittest/expected_creole/test_creole_list_ol.latex +0 -22
  134. data/unittest/expected_creole/test_creole_list_ol_after_ul.html +0 -12
  135. data/unittest/expected_creole/test_creole_list_ol_after_ul.latex +0 -20
  136. data/unittest/expected_creole/test_creole_list_ol_after_ul.text +0 -6
  137. data/unittest/expected_creole/test_creole_list_ol_ul.html +0 -15
  138. data/unittest/expected_creole/test_creole_list_ol_ul.latex +0 -26
  139. data/unittest/expected_creole/test_creole_list_ul.html +0 -22
  140. data/unittest/expected_creole/test_creole_list_ul.latex +0 -40
  141. data/unittest/expected_creole/test_creole_list_ul.normsource +0 -89
  142. data/unittest/expected_creole/test_creole_list_ul.normsource_1.8 +0 -83
  143. data/unittest/expected_creole/test_creole_list_ul_too_much.html +0 -24
  144. data/unittest/expected_creole/test_creole_list_ul_too_much.latex +0 -44
  145. data/unittest/expected_creole/test_creole_list_ulul_without_ul.html +0 -6
  146. data/unittest/expected_creole/test_creole_list_ulul_without_ul.latex +0 -12
  147. data/unittest/expected_creole/test_creole_mix_titles_list.html +0 -10
  148. data/unittest/expected_creole/test_creole_mix_titles_list.latex +0 -18
  149. data/unittest/expected_creole/test_creole_mix_titles_list.text +0 -12
  150. data/unittest/expected_creole/test_creole_newline.html +0 -9
  151. data/unittest/expected_creole/test_creole_newline.latex +0 -11
  152. data/unittest/expected_creole/test_creole_newline.text +0 -7
  153. data/unittest/expected_creole/test_creole_paragraphs.html +0 -6
  154. data/unittest/expected_creole/test_creole_paragraphs.latex +0 -8
  155. data/unittest/expected_creole/test_creole_paragraphs.normsource +0 -29
  156. data/unittest/expected_creole/test_creole_paragraphs.normsource_1.8 +0 -27
  157. data/unittest/expected_creole/test_creole_paragraphs.text +0 -4
  158. data/unittest/expected_creole/test_creole_paragraphs.wiki +0 -4
  159. data/unittest/expected_creole/test_creole_paragraphs_wrap.html +0 -5
  160. data/unittest/expected_creole/test_creole_paragraphs_wrap.latex +0 -6
  161. data/unittest/expected_creole/test_creole_paragraphs_wrap.text +0 -4
  162. data/unittest/expected_creole/test_creole_paragraphs_wrap.wiki +0 -4
  163. data/unittest/expected_creole/test_creole_paragraphs_wrap0.html +0 -9
  164. data/unittest/expected_creole/test_creole_paragraphs_wrap0.latex +0 -11
  165. data/unittest/expected_creole/test_creole_paragraphs_wrap0.text +0 -7
  166. data/unittest/expected_creole/test_creole_paragraphs_wrap0.wiki +0 -7
  167. data/unittest/expected_creole/test_creole_paragraphs_wrap60.html +0 -5
  168. data/unittest/expected_creole/test_creole_paragraphs_wrap60.latex +0 -6
  169. data/unittest/expected_creole/test_creole_paragraphs_wrap60.text +0 -4
  170. data/unittest/expected_creole/test_creole_paragraphs_wrap60.wiki +0 -4
  171. data/unittest/expected_creole/test_creole_picture_link.html +0 -6
  172. data/unittest/expected_creole/test_creole_pictures.html +0 -10
  173. data/unittest/expected_creole/test_creole_pictures.latex +0 -13
  174. data/unittest/expected_creole/test_creole_pictures_css.html +0 -6
  175. data/unittest/expected_creole/test_creole_pictures_css.latex +0 -8
  176. data/unittest/expected_creole/test_creole_pictures_imgclass.html +0 -6
  177. data/unittest/expected_creole/test_creole_pictures_imgclass.latex +0 -8
  178. data/unittest/expected_creole/test_creole_pictures_longdesc.html +0 -3
  179. data/unittest/expected_creole/test_creole_pictures_width.html +0 -3
  180. data/unittest/expected_creole/test_creole_pictures_width.latex +0 -4
  181. data/unittest/expected_creole/test_creole_placeholders_html.html +0 -7
  182. data/unittest/expected_creole/test_creole_placeholders_html.latex +0 -8
  183. data/unittest/expected_creole/test_creole_placeholders_html.text +0 -4
  184. data/unittest/expected_creole/test_creole_placeholders_latex.html +0 -6
  185. data/unittest/expected_creole/test_creole_placeholders_latex.latex +0 -9
  186. data/unittest/expected_creole/test_creole_placeholders_latex.text +0 -4
  187. data/unittest/expected_creole/test_creole_short_html.html +0 -3
  188. data/unittest/expected_creole/test_creole_short_html.latex +0 -4
  189. data/unittest/expected_creole/test_creole_short_html.text +0 -2
  190. data/unittest/expected_creole/test_creole_shy.creole +0 -6
  191. data/unittest/expected_creole/test_creole_shy.html +0 -6
  192. data/unittest/expected_creole/test_creole_shy.latex +0 -8
  193. data/unittest/expected_creole/test_creole_shy.text +0 -4
  194. data/unittest/expected_creole/test_creole_tabular.creole +0 -22
  195. data/unittest/expected_creole/test_creole_tabular.html +0 -20
  196. data/unittest/expected_creole/test_creole_tabular.latex +0 -22
  197. data/unittest/expected_creole/test_creole_tabular_creole.creole +0 -19
  198. data/unittest/expected_creole/test_creole_tabular_creole.html +0 -18
  199. data/unittest/expected_creole/test_creole_tabular_creole.latex +0 -19
  200. data/unittest/expected_creole/test_creole_tabular_css.creole +0 -24
  201. data/unittest/expected_creole/test_creole_tabular_css.html +0 -20
  202. data/unittest/expected_creole/test_creole_tabular_css.latex +0 -22
  203. data/unittest/expected_creole/test_creole_tabular_multicols.creole +0 -16
  204. data/unittest/expected_creole/test_creole_tabular_multicols.html +0 -14
  205. data/unittest/expected_creole/test_creole_tabular_multicols.latex +0 -16
  206. data/unittest/expected_creole/test_creole_tabular_row_parameters.latex +0 -22
  207. data/unittest/expected_creole/test_creole_tabular_with_cell_option.creole +0 -21
  208. data/unittest/expected_creole/test_creole_tabular_with_cell_option.html +0 -20
  209. data/unittest/expected_creole/test_creole_toc.html +0 -13
  210. data/unittest/expected_creole/test_creole_toc.latex +0 -22
  211. data/unittest/expected_creole/test_creole_toc.text +0 -4
  212. data/unittest/expected_creole/test_creole_toc_level.html +0 -7
  213. data/unittest/expected_creole/test_creole_toc_level.latex +0 -10
  214. data/unittest/expected_creole/test_creole_toc_level.text +0 -3
  215. data/unittest/expected_creole/test_creole_toc_level_text.html +0 -8
  216. data/unittest/expected_creole/test_creole_toc_level_text.latex +0 -9
  217. data/unittest/expected_creole/test_creole_toc_text.html +0 -5
  218. data/unittest/expected_creole/test_creole_toc_text.latex +0 -5
  219. data/unittest/expected_creole/test_creole_ul_multiple_line.html +0 -7
  220. data/unittest/expected_creole/test_creole_ul_multiple_line.latex +0 -14
  221. data/unittest/expected_creole/test_creole_ul_with_blank.html +0 -11
  222. data/unittest/expected_creole/test_creole_ul_with_blank.latex +0 -20
  223. data/unittest/expected_creole/test_creole_ul_with_bold.creole +0 -0
  224. data/unittest/expected_creole/test_creole_ul_with_bold.html +0 -11
  225. data/unittest/expected_creole/test_creole_ul_with_bold.latex +0 -18
  226. data/unittest/expected_creole/test_creole_ul_with_bold.text +0 -7
  227. data/unittest/expected_creole/test_creole_verbatim.html +0 -25
  228. data/unittest/expected_creole/test_creole_verbatim.latex +0 -33
  229. data/unittest/expected_creole/test_creole_verbatim.text +0 -17
  230. data/unittest/expected_creole/test_creole_verbatim_inline.html +0 -6
  231. data/unittest/expected_creole/test_creole_verbatim_inline.latex +0 -8
  232. data/unittest/expected_creole/test_creole_verbatim_inline_at_start.html +0 -6
  233. data/unittest/expected_creole/test_creole_verbatim_inline_at_start.latex +0 -8
  234. data/unittest/expected_creole_rail/test_rail_creole_object.tex +0 -33
  235. data/unittest/expected_creole_rail/test_rail_creole_placeholder.tex +0 -40
  236. data/unittest/expected_rubycode4doc/creole_complete.html +0 -26
  237. data/unittest/expected_rubycode4doc/creole_complete.tex +0 -40
  238. data/unittest/expected_rubycode4doc/creole_in_tab.html +0 -4
  239. data/unittest/expected_rubycode4doc/creole_in_tab.tex +0 -6
  240. data/unittest/expected_rubycode4doc/creole_inline_ruby.html +0 -7
  241. data/unittest/expected_rubycode4doc/creole_output.html +0 -2
  242. data/unittest/expected_rubycode4doc/creole_output.tex +0 -4
  243. data/unittest/expected_rubycode4doc/creole_rubycode.html +0 -1
  244. data/unittest/expected_rubycode4doc/creole_rubycode.tex +0 -3
  245. data/unittest/expected_rubycode4doc/creole_rubycode_evaluated.html +0 -1
  246. data/unittest/expected_rubycode4doc/creole_rubycode_evaluated.tex +0 -3
  247. data/unittest/expected_rubycode4doc/creole_rubycode_evaluated_listings.html +0 -3
  248. data/unittest/expected_rubycode4doc/creole_rubycode_evaluated_listings.tex +0 -5
  249. data/unittest/expected_rubycode4doc/wiki_1.html +0 -8
  250. data/unittest/expected_rubycode4doc/wiki_2.html +0 -8
  251. data/unittest/expected_rubycode4doc/wiki_3.html +0 -9
  252. data/unittest/expected_rubycode4doc/wiki_immediate_1.html +0 -5
  253. data/unittest/expected_rubycode4doc/wiki_immediate_2.html +0 -5
  254. data/unittest/expected_rubycode4doc/wiki_immediate_3.html +0 -8
  255. data/unittest/expected_rubycode4doc/wiki_immediate_full.html +0 -21
  256. data/unittest/expected_wikimedia/test_wiki.html +0 -6
  257. data/unittest/expected_wikimedia/test_wiki.latex +0 -12
  258. data/unittest/expected_wikimedia/test_wiki.text +0 -14
  259. data/unittest/expected_wikimedia/test_wiki.wiki +0 -12
  260. data/unittest/expected_wikimedia/test_wiki_description.html +0 -7
  261. data/unittest/expected_wikimedia/test_wiki_description.latex +0 -11
  262. data/unittest/expected_wikimedia/test_wiki_description.text +0 -6
  263. data/unittest/expected_wikimedia/test_wiki_description.wiki +0 -6
  264. data/unittest/expected_wikimedia/test_wiki_footnote.html +0 -8
  265. data/unittest/expected_wikimedia/test_wiki_footnote.latex +0 -17
  266. data/unittest/expected_wikimedia/test_wiki_footnote.text +0 -10
  267. data/unittest/expected_wikimedia/test_wiki_footnote.wiki +0 -10
  268. data/unittest/expected_wikimedia/test_wiki_footnote_2.html +0 -8
  269. data/unittest/expected_wikimedia/test_wiki_footnote_groupid.html +0 -21
  270. data/unittest/expected_wikimedia/test_wiki_html_code.html +0 -7
  271. data/unittest/expected_wikimedia/test_wiki_html_code.latex +0 -10
  272. data/unittest/expected_wikimedia/test_wiki_html_code.text +0 -6
  273. data/unittest/expected_wikimedia/test_wiki_html_code.wiki +0 -6
  274. data/unittest/expected_wikimedia/test_wiki_inline.html +0 -6
  275. data/unittest/expected_wikimedia/test_wiki_inline.latex +0 -12
  276. data/unittest/expected_wikimedia/test_wiki_inline.text +0 -8
  277. data/unittest/expected_wikimedia/test_wiki_inline.wiki +0 -8
  278. data/unittest/expected_wikimedia/test_wiki_label.html +0 -6
  279. data/unittest/expected_wikimedia/test_wiki_link.html +0 -8
  280. data/unittest/expected_wikimedia/test_wiki_link.latex +0 -17
  281. data/unittest/expected_wikimedia/test_wiki_link.wiki +0 -11
  282. data/unittest/expected_wikimedia/test_wiki_list_ol.html +0 -24
  283. data/unittest/expected_wikimedia/test_wiki_list_ol.latex +0 -30
  284. data/unittest/expected_wikimedia/test_wiki_list_ol.text +0 -10
  285. data/unittest/expected_wikimedia/test_wiki_list_ol.wiki +0 -12
  286. data/unittest/expected_wikimedia/test_wiki_list_ol_after_ul.html +0 -16
  287. data/unittest/expected_wikimedia/test_wiki_list_ol_after_ul.latex +0 -24
  288. data/unittest/expected_wikimedia/test_wiki_list_ol_after_ul.text +0 -8
  289. data/unittest/expected_wikimedia/test_wiki_list_ol_after_ul.wiki +0 -10
  290. data/unittest/expected_wikimedia/test_wiki_list_ol_ul.html +0 -24
  291. data/unittest/expected_wikimedia/test_wiki_list_ol_ul.latex +0 -30
  292. data/unittest/expected_wikimedia/test_wiki_list_ol_ul.text +0 -10
  293. data/unittest/expected_wikimedia/test_wiki_list_ol_ul.wiki +0 -12
  294. data/unittest/expected_wikimedia/test_wiki_list_ul.html +0 -24
  295. data/unittest/expected_wikimedia/test_wiki_list_ul.latex +0 -30
  296. data/unittest/expected_wikimedia/test_wiki_list_ul.text +0 -10
  297. data/unittest/expected_wikimedia/test_wiki_list_ul.wiki +0 -12
  298. data/unittest/expected_wikimedia/test_wiki_list_ul_too_much.html +0 -39
  299. data/unittest/expected_wikimedia/test_wiki_list_ul_too_much.latex +0 -51
  300. data/unittest/expected_wikimedia/test_wiki_list_ul_too_much.text +0 -11
  301. data/unittest/expected_wikimedia/test_wiki_list_ul_too_much.wiki +0 -15
  302. data/unittest/expected_wikimedia/test_wiki_picture.html +0 -55
  303. data/unittest/expected_wikimedia/test_wiki_picture.latex +0 -76
  304. data/unittest/expected_wikimedia/test_wiki_picture_thumb.html +0 -5
  305. data/unittest/expected_wikimedia/test_wiki_tab1.html +0 -30
  306. data/unittest/expected_wikimedia/test_wiki_tab1.latex +0 -30
  307. data/unittest/expected_wikimedia/test_wiki_tab1.wiki +0 -29
  308. data/unittest/expected_wikimedia/test_wiki_textformatting.html +0 -7
  309. data/unittest/expected_wikimedia/test_wiki_textformatting.latex +0 -16
  310. data/unittest/expected_wikimedia/test_wiki_textformatting.text +0 -11
  311. data/unittest/expected_wikimedia/test_wiki_textformatting.wiki +0 -9
  312. data/unittest/expected_wikimedia/test_wiki_toc.html +0 -9
  313. data/unittest/expected_wikimedia/test_wiki_toc.latex +0 -18
  314. data/unittest/expected_wikimedia/test_wiki_toc.text +0 -21
  315. data/unittest/expected_wikimedia/test_wiki_toc.wiki +0 -18
  316. data/unittest/expected_wikimedia/test_wiki_ul_multiple_line.html +0 -18
  317. data/unittest/expected_wikimedia/test_wiki_ul_multiple_line.latex +0 -19
  318. data/unittest/expected_wikimedia/test_wiki_ul_multiple_line.text +0 -6
  319. data/unittest/expected_wikimedia/test_wiki_ul_multiple_line.wiki +0 -7
  320. data/unittest/unittest_creole.rb +0 -1361
  321. data/unittest/unittest_creole_placeholders.rb +0 -150
  322. data/unittest/unittest_creole_plugin_rail.rb +0 -147
  323. data/unittest/unittest_creole_tabular.rb +0 -207
  324. data/unittest/unittest_wikimedia.rb +0 -479
@@ -1,150 +0,0 @@
1
- if $0 == __FILE__
2
- $:.unshift("../lib")
3
- end
4
-
5
- gem 'test-unit'
6
- require 'test/unit'
7
- require 'more_unit_test/assert_equal_filecontent.rb'
8
-
9
- require 'creole/creole2doc.rb'
10
- require 'creole/plugins/rail.rb'
11
- require 'creole/plugins/struktex.rb'
12
- require 'creole/plugins/todonotes.rb'
13
- require 'creole/plugins/rubycode4creole.rb'
14
-
15
- #~ DOCGENERATOR_LOGGER.level = Log4r::DEBUG
16
- #~ DOCGENERATOR_DEFAULT_LOGGER.level = Log4r::WARN
17
- #~ Docgenerator.trace_on
18
-
19
-
20
- #Avoid warnings about missing logger in to_doc
21
- OPT = { :log => Docgenerator::DOCGENERATOR_DEFAULT_LOGGER } unless defined? OPT
22
-
23
- require 'log4r'
24
- #Warn -> report missing important test
25
- #Info -> report missing test
26
- $log = Log4r::Logger.new('Unittest creole', Log4r::ERROR)
27
- #~ $log = Log4r::Logger.new('Unittest creole', Log4r::WARN)
28
- #~ $log = Log4r::Logger.new('Unittest creole', Log4r::INFO)
29
- $log.outputters = Log4r::StdoutOutputter.new('log_stdout')
30
-
31
- #Logger to catch unwanted messages
32
- $tmplog = Log4r::Logger.new('Creole', Log4r::FATAL)
33
-
34
- <<missingtests
35
- erweitern:
36
- *todonotes
37
-
38
- placeholder mit parameter (siehe creole_rail)
39
-
40
- Bug:
41
- http://... am Ende ohne folgenden Text wird falsch erkannt.
42
- --> test_creole_links_implicit_end()
43
- missingtests
44
-
45
- class Test_creole_placeholder_interface < Test::Unit::TestCase
46
- def test_creole_placeholders()
47
- creole = Docgenerator::Creole::Creole.new(:content => <<creole
48
- ==Titel 1==
49
- Text
50
- creole
51
- )
52
- assert_equal( Docgenerator::Creole::Placeholders::Collection, creole.placeholders)
53
- assert_equal( Docgenerator::Creole::Placeholders::Dummy, Docgenerator::Creole::Placeholders::Collection[:undefined])
54
- assert_equal( Docgenerator::Creole::Placeholders::Creole_html, Docgenerator::Creole::Placeholders::Collection['html'])
55
- #~ assert_instance_of( Dummy_placeholder, Creole::Placeholders[:undefined])
56
- end #test_creole_placeholders
57
-
58
- =begin
59
- Define test for each placeholder.
60
- =end
61
- Docgenerator::Creole::Placeholders::Collection.each{|key,placeholder_class|
62
- code = <<-xx
63
- def test_#{placeholder_class.to_s.gsub(/::/, '_')}()
64
- do_interfacetest('#{key}', #{placeholder_class})
65
- end
66
- xx
67
- class_eval(code)
68
- }
69
- =begin rdoc
70
- Test, if the interface for a placeholder follows the main definition.
71
-
72
- =end
73
- def do_interfacetest(key,placeholder_class)
74
- assert_equal( placeholder_class, Docgenerator::Creole::Placeholders[key])
75
- assert_equal( placeholder_class, Docgenerator::Creole::Placeholders::Collection[key])
76
- assert_equal( placeholder_class, Docgenerator::Creole::Creole.new.placeholders[key])
77
-
78
- assert_nothing_raised("Interface error for class #{placeholder_class}"){
79
- begin
80
- placeholder = placeholder_class.new( Docgenerator::Creole::Creole.new )
81
- rescue Docgenerator::Creole::Placeholder::ParameterError
82
- #Docgenerator::Creole_placeholder::ParameterError is an accepted error
83
- #Happens if this placeholder needs a parameter.
84
- else
85
- #Check inheritance.
86
- assert_kind_of( Docgenerator::Creole::Placeholder, placeholder)
87
- end
88
- }
89
- assert_nothing_raised("Interface error for class #{placeholder_class}"){
90
- begin
91
- placeholder = placeholder_class.new( Docgenerator::Creole::Creole.new, 'a' )
92
- rescue Docgenerator::Creole::Placeholder::ParameterError
93
- #Docgenerator::Creole_placeholder::ParameterError is an accepted error
94
- #Happens if this placeholder needs a specific parameter.
95
- else
96
- #Check inheritance.
97
- assert_kind_of( Docgenerator::Creole::Placeholder, placeholder)
98
- end
99
- }
100
- #Check 2 parameters
101
- assert_raise(ArgumentError, "Interface error for class #{placeholder_class}"){
102
- placeholder = placeholder_class.new( Docgenerator::Creole::Creole.new, 'a', 'b' )
103
- #Check inheritance.
104
- assert_kind_of( Docgenerator::Creole::Placeholder, placeholder)
105
- }
106
- end #do_interfacetest(key,placeholder_class)
107
-
108
- end #class Test_creole_placeholder_interface
109
-
110
- class Test_creole_placeholders_html < Test::Unit::TestCase
111
- def test_creole_placeholders_html()
112
- creole = Docgenerator::Creole::Creole.new(:content => <<creole
113
- before
114
- <<<html
115
- <em>this is only for HTML</em>
116
- >>>
117
- after
118
- creole
119
- )
120
- #Really like this? Or should there be no paragraph?
121
- assert_equal_filecontent( "expected_creole/test_creole_placeholders_html.html", creole.to_doc(:html, OPT))
122
- assert_equal_filecontent( "expected_creole/test_creole_placeholders_html.latex", creole.to_doc(:latex, OPT))
123
- $log.warn('test_creole_placeholders_html: to_context')
124
- #~ assert_equal_filecontent( "expected_creole/test_creole_placeholders_html.context", creole.to_doc(:context))
125
- $log.warn('test_creole_placeholders_html: to wiki/creole')
126
- #~ assert_equal_filecontent( "expected_creole/test_creole_placeholders_html.creole", creole.to_doc(:creole))
127
- assert_equal_filecontent( "expected_creole/test_creole_placeholders_html.text", creole.to_doc(:text, OPT))
128
- end #test_creole_placeholders_html
129
- end #class Test_creole_placeholders_html
130
- class Test_creole_placeholders_latex < Test::Unit::TestCase
131
- def test_creole_placeholders_latex()
132
- creole = Docgenerator::Creole::Creole.new(:content => <<creole
133
- before
134
- <<<latex
135
- \\textbf{this is only for latex}
136
- >>>
137
- after
138
- creole
139
- )
140
- #Really like this? Or should there be no paragraph?
141
- assert_equal_filecontent( "expected_creole/test_creole_placeholders_latex.html", creole.to_doc(:html, OPT))
142
- assert_equal_filecontent( "expected_creole/test_creole_placeholders_latex.latex", creole.to_doc(:latex, OPT))
143
- $log.warn('test_creole_placeholders_latex: to_context')
144
- #~ assert_equal_filecontent( "expected_creole/test_creole_placeholders_context.context", creole.to_doc(:context))
145
- $log.warn('test_creole_placeholders_latex: to wiki/creole')
146
- #~ assert_equal_filecontent( "expected_creole/test_creole_placeholders_latex.creole", creole.to_doc(:creole))
147
- assert_equal_filecontent( "expected_creole/test_creole_placeholders_latex.text", creole.to_doc(:text, OPT))
148
- end #test_creole_placeholders_latex
149
- end #Test_creole_placeholders
150
-
@@ -1,147 +0,0 @@
1
- #~ require '../test_docgenerator.rb'
2
- require 'test/unit'
3
- require 'more_unit_test/assert_equal_filecontent.rb'
4
-
5
- if $0 == __FILE__
6
- $:.unshift("../lib")
7
- end
8
-
9
- require 'creole/plugins/rail.rb'
10
-
11
- #~ $log = Log4r::Logger.new( 'test rail', Log4r::WARN )
12
- #~ $log.outputters = Log4r::StdoutOutputter.new('test rail')
13
- #~ $log.level = Log4r::INFO
14
-
15
- #~ $log.info("Remark: Known errors/problems and missing checks are logged.")
16
- #~ DOCGENERATOR_LOGGER.level = Log4r::DEBUG
17
- #~ DOCGENERATOR_LOGGER.level = Log4r::INFO
18
- #~ DOCGENERATOR_LOGGER.level = Log4r::WARN
19
- #~ DOCGENERATOR_LOGGER.level = Log4r::ERROR
20
-
21
- #~ include Log4r
22
-
23
- #~ class Test_rail < Test::Unit::TestCase
24
- #~ def test_rail()
25
- #~ block = Rail_diagramm.new('block', <<-RAIL
26
- #~ ( lbrace | 'begin' )
27
- #~ ( ( '|' ( variable + ',' ) '|' ) | [Keine Blockvariablen] )
28
- #~ comm
29
- #~ ( rbrace | 'end' )
30
- #~ RAIL
31
- #~ )
32
- #~ assert_equal_filecontent( "expected_rail/rail_.rail", text.to_doc(:tex))
33
- #~ end
34
- #~ end #Test_rail
35
-
36
- class Test_creole_rail < Test::Unit::TestCase
37
- def test_document_placeholder()
38
- doc = Docgenerator::Creole::Creole_document.new(
39
- :title => 'Rail-Diagramms in Creole'
40
- )
41
- assert_nothing_raised(){
42
- doc << <<DATA
43
- <<<rail|id
44
- A
45
- >>>
46
- DATA
47
- }
48
- end
49
- def test_document_placeholder_missing_id()
50
- doc = Docgenerator::Creole::Creole_document.new(
51
- :title => 'Rail-Diagramms in Creole'
52
- )
53
- assert_raise( Docgenerator::Creole::Placeholder::ParameterError ){
54
- doc << <<DATA
55
- <<<rail
56
- A
57
- >>>
58
- DATA
59
- }
60
- end
61
- def test_document_placeholder_wrong_id()
62
- doc = Docgenerator::Creole::Creole_document.new(
63
- :title => 'Rail-Diagramms in Creole'
64
- )
65
- assert_raise( Docgenerator::Creole::Placeholder::ParameterError ){
66
- doc << <<DATA
67
- <<<rail|id-with-minus
68
- A
69
- >>>
70
- DATA
71
- }
72
- end
73
-
74
- def test_document_placeholder_in_wiki()
75
- doc = Docgenerator::Creole::Creole_document.new(
76
- :title => 'Rail-Diagramms in Creole'
77
- )
78
- doc.doc.head << Docgenerator::Creole::Rail::Rail_diagramm::TEX_PACKAGE_RAIL
79
- #~ doc.doc.head << element(:latexonly,{}, [
80
- #~ Rail_diagramm::RAIL_ALIAS,
81
- #~ '\railterm{lowcharacter,uppercharacter}',
82
- #~ ])
83
-
84
- doc << <<DATA
85
- =Rail-Diagramms
86
- ==Via Placeholder
87
- <<<rail|test
88
- [1] (
89
- ( '[' string ']' )
90
- ? body[2--6] + '|'
91
- )
92
- | [2] body[3--6] '*' body[5--6]
93
- | [2] body[3--6] '+' body[5--6]
94
- | [3] ( body[4--5] + )
95
- | [4] body[5] '?'
96
- | [5] identifier ( '[' string ']' ) ?
97
- | [5] quote string quote
98
- | [5] dquote string dquote
99
- | [5] '(' body[1--6] ')'
100
- | [5] cr
101
- | [6]
102
- ;
103
- >>>
104
- DATA
105
- #~ doc.runtex = :pdflatex
106
- assert_equal_filecontent( "expected_creole_rail/test_rail_creole_placeholder.tex", doc.doc.to_latex({
107
- :template=> Docgenerator::DocumentTemplate[:article],
108
- :filename => 'xx',
109
- :log => doc.doc.log
110
- }))
111
- end
112
-
113
-
114
- def test_document_object()
115
- $block = Docgenerator::Creole::Rail::Rail_diagramm.new('block', <<-RAIL
116
- ( lbrace | 'begin' )
117
- ( ( '|' ( variable + ',' ) '|' ) | [Keine Blockvariablen] )
118
- comm
119
- ( rbrace | 'end' )
120
- RAIL
121
- )
122
- doc = Docgenerator::Creole::Creole_document.new(
123
- :title => 'Rail-Diagramms in Creole'
124
- )
125
- doc.doc.head << Docgenerator::Creole::Rail::Rail_diagramm::TEX_PACKAGE_RAIL
126
- #~ doc.doc.head << element(:latexonly,{}, [
127
- #~ Rail_diagramm::RAIL_ALIAS,
128
- #~ '\railterm{lowcharacter,uppercharacter}',
129
- #~ ])
130
-
131
- doc << <<DATA
132
- =Rail-Diagramms
133
- ==Via Ruby-object
134
- <<ruby_raw|$block.to_latex>>
135
- DATA
136
- #~ doc.runtex = :pdflatex
137
- assert_equal_filecontent( "expected_creole_rail/test_rail_creole_object.tex", doc.doc.to_latex({
138
- :template=> Docgenerator::DocumentTemplate[:article],
139
- :filename => 'xx',
140
- :log => doc.doc.log
141
- }))
142
- end
143
- end #Test_rail
144
-
145
- #~ assert_equal_filecontent( "expected_rail/rail_.rail", text.to_doc(:tex))
146
-
147
- __END__
@@ -1,207 +0,0 @@
1
- if $0 == __FILE__
2
- $:.unshift("../lib")
3
- end
4
-
5
- =begin
6
- erweitern:
7
- *tabulars
8
- *Creole_creoletab
9
- *csv-tabs
10
-
11
- =end
12
-
13
-
14
- gem 'test-unit'
15
- require 'test/unit'
16
- require 'more_unit_test/assert_equal_filecontent.rb'
17
-
18
- require 'creole/creole2doc.rb'
19
-
20
- #Avoid warnings about missing logger in to_doc
21
- OPT = { :log => Docgenerator::DOCGENERATOR_DEFAULT_LOGGER } unless defined? OPT
22
-
23
- require 'log4r'
24
- #Warn -> report missing important test
25
- #Info -> report missing test
26
- $log = Log4r::Logger.new('Unittest creole', Log4r::ERROR)
27
- #~ $log = Log4r::Logger.new('Unittest creole', Log4r::WARN)
28
- #~ $log = Log4r::Logger.new('Unittest creole', Log4r::INFO)
29
- $log.outputters = Log4r::StdoutOutputter.new('log_stdout')
30
-
31
-
32
- #http://www.wikicreole.org/wiki/Tables
33
- class Test_creole_tabular < Test::Unit::TestCase
34
- def test_creole_tabular_creole()
35
- creole = Docgenerator::Creole::Creole.new(
36
- :name => 'tabular_creole',
37
- :content => <<'creole'
38
- Tables are done like this:
39
- |=header col1|=header col2|
40
- |col1|col2|
41
- |you |can |
42
- |also |align\\ it. |
43
- creole
44
- )
45
- $log.warn('test_creole_tabular_creole: tabular inside paragraphs/list...')
46
- $log.warn('test_creole_tabular_creole: wiki syntax inside cell ')
47
- assert_equal_filecontent( "expected_creole/test_creole_tabular_creole.html", creole.to_doc(:html, OPT))
48
- assert_equal_filecontent( "expected_creole/test_creole_tabular_creole.latex", creole.to_doc(:latex, OPT))
49
- $log.warn('test_creole_tabular_creole: to_context')
50
- #~ assert_equal_filecontent( "expected_creole/test_creole_tabular_creole.context", creole.to_doc(:context))
51
- tmp = OPT[:log].level
52
- OPT[:log].level = Log4r::ERROR #Suppress warning about newline
53
- assert_equal_filecontent( "expected_creole/test_creole_tabular_creole.creole", creole.to_doc(:creole, OPT))
54
- OPT[:log].level = tmp
55
- $log.warn('test_creole_tabular_creole: to text')
56
- #~ assert_equal_filecontent( "expected_creole/test_creole_tabular_creole.text", creole.to_doc(:text))
57
- end #test_creole_tabular_creole
58
-
59
- def test_creole_tabular()
60
- creole = Docgenerator::Creole::Creole.new(:content => <<creole
61
- before
62
- <<<tabular
63
- |!columns=3
64
- |!columndescription=ccc
65
- |=1
66
- |=2
67
- |=3
68
- |-
69
- |eins
70
- |zwei
71
- |drei
72
- |-
73
- |one
74
- |two
75
- |three
76
- >>>
77
- after
78
- creole
79
- )
80
- assert_equal_filecontent( "expected_creole/test_creole_tabular.html", creole.to_doc(:html, OPT))
81
- assert_equal_filecontent( "expected_creole/test_creole_tabular.latex", creole.to_doc(:latex, OPT))
82
- $log.warn('test_creole_tabular: to_context')
83
- #~ assert_equal_filecontent( "expected_creole/test_creole_tabular.context", creole.to_doc(:context))
84
- assert_equal_filecontent( "expected_creole/test_creole_tabular.creole", creole.to_doc(:creole))
85
- $log.warn('test_creole_tabular: to text')
86
- #~ assert_equal_filecontent( "expected_creole/test_creole_tabular.text", creole.to_doc(:text))
87
- end #test_creole_tabular
88
-
89
- def test_creole_tabular_with_cell_option()
90
- # title...
91
- creole = Docgenerator::Creole::Creole.new(:content => <<creole
92
- before
93
- <<<tabular
94
- |!columns=3
95
- |eins||css=color: red
96
- |css = zwei
97
- |||class=empty
98
- |-
99
- |normal
100
- |//italic//
101
- |//italic//||class=it
102
- |-
103
- |text with | nice! ||class = it
104
- |||css =
105
- |
106
- >>>
107
- after
108
- creole
109
- )
110
- assert_equal_filecontent( "expected_creole/test_creole_tabular_with_cell_option.html", creole.to_doc(:html, OPT))
111
- #~ assert_equal_filecontent( "expected_creole/test_creole_tabular_with_option.latex", creole.to_doc(:latex))
112
- $log.warn('test_creole_tabular: to_context')
113
- #~ assert_equal_filecontent( "expected_creole/test_creole_tabular_with_cell_option.context", creole.to_doc(:context))
114
- assert_equal_filecontent( "expected_creole/test_creole_tabular_with_cell_option.creole", creole.to_doc(:creole))
115
- $log.warn('test_creole_tabular: to text')
116
- #~ assert_equal_filecontent( "expected_creole/test_creole_tabular_with_cell_option.text", creole.to_doc(:text))
117
- end #test_creole_tabular
118
-
119
- def test_creole_tabular_css()
120
- creole = Docgenerator::Creole::Creole.new(:content => <<creole
121
- before
122
- <<<tabular
123
- |!columns=3
124
- |!columndescription=ccc
125
- |!css=border-width: 1px
126
- |!css=border-style: solid
127
- |=1
128
- |=2
129
- |=3
130
- |-
131
- |eins
132
- |zwei
133
- |drei
134
- |-
135
- |one
136
- |two
137
- |three
138
- >>>
139
- after
140
- creole
141
- )
142
- assert_equal_filecontent( "expected_creole/test_creole_tabular_css.html", creole.to_doc(:html, OPT))
143
- assert_equal_filecontent( "expected_creole/test_creole_tabular_css.latex", creole.to_doc(:latex, OPT))
144
- $log.warn('test_creole_tabular_css: to_context')
145
- #~ assert_equal_filecontent( "expected_creole/test_creole_tabular_css.context", creole.to_doc(:context))
146
- assert_equal_filecontent( "expected_creole/test_creole_tabular_css.creole", creole.to_doc(:creole))
147
- $log.warn('test_creole_tabular_css: to text')
148
- #~ assert_equal_filecontent( "expected_creole/test_creole_tabular_css.text", creole.to_doc(:text))
149
- end #test_creole_tabular_css
150
-
151
- def test_creole_tabular_row_parameters()
152
- creole = Docgenerator::Creole::Creole.new(:content => <<creole
153
- before
154
- <<<tabular
155
- |!columns=3
156
- |!columndescription=ccc
157
- |Titel A
158
- |Titel B
159
- |Titel C
160
- |-|toprule
161
- |eins
162
- |zwei
163
- |drei
164
- |-|midrule
165
- |eins
166
- |zwei
167
- |drei
168
- >>>
169
- after
170
- creole
171
- )
172
- $log.warn("#{__method__}: to_html")
173
- #~ assert_equal_filecontent( "expected_creole/#{__method__}.html", creole.to_doc(:html, OPT))
174
- assert_equal_filecontent( "expected_creole/#{__method__}.latex", creole.to_doc(:latex, OPT))
175
- $log.warn("#{__method__}: to_context")
176
- #~ assert_equal_filecontent( "expected_creole/#{__method__}.context", creole.to_doc(:context))
177
- $log.warn("#{__method__}: to_creole")
178
- #~ assert_equal_filecontent( "expected_creole/#{__method__}.creole", creole.to_doc(:creole))
179
- $log.warn("#{__method__}: to text")
180
- #~ assert_equal_filecontent( "expected_creole/#{__method__}.text", creole.to_doc(:text))
181
- end #test_creole_tabular_row_parameters
182
-
183
-
184
- def test_creole_tabular_multicols()
185
- creole = Docgenerator::Creole::Creole.new(:content => <<creole
186
- before
187
- <<<tabular
188
- |!columns=3
189
- |!columndescription=ccc
190
- |=Titelzeile||columns=3|pos=c
191
- |-
192
- |eins
193
- |zwei
194
- |drei
195
- >>>
196
- after
197
- creole
198
- )
199
- assert_equal_filecontent( "expected_creole/test_creole_tabular_multicols.html", creole.to_doc(:html, OPT))
200
- assert_equal_filecontent( "expected_creole/test_creole_tabular_multicols.latex", creole.to_doc(:latex, OPT))
201
- $log.warn('test_creole_tabular_multicols: to_context')
202
- #~ assert_equal_filecontent( "expected_creole/test_creole_tabular_multicols.context", creole.to_doc(:context))
203
- assert_equal_filecontent( "expected_creole/test_creole_tabular_multicols.creole", creole.to_doc(:creole))
204
- $log.warn('test_creole_tabular_multicols: to text')
205
- #~ assert_equal_filecontent( "expected_creole/test_creole_tabular_multicols.text", creole.to_doc(:text))
206
- end #test_creole_tabular_multicols
207
- end #Test_creole_tabular