docgenerator 2.1.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/docgenerator.rb +18 -18
- data/lib/docgenerator/characters.rb +1 -0
- data/lib/docgenerator/css.rb +5 -0
- data/lib/docgenerator/document.rb +7 -2
- data/lib/docgenerator/element.rb +2 -2
- data/lib/docgenerator/elements.rb +69 -2
- data/lib/docgenerator/index.rb +1 -1
- data/lib/docgenerator/packages/listings.rb +94 -94
- data/lib/docgenerator/packages/multicol.rb +1 -1
- data/lib/docgenerator/packages/pdfpages.rb +2 -1
- data/lib/docgenerator/packages/rubycode4doc.rb +173 -172
- data/lib/docgenerator/packages/struktex.rb +395 -379
- data/lib/docgenerator/packages/todonotes.rb +2 -2
- data/lib/docgenerator/packages/url.rb +4 -0
- data/lib/docgenerator/sections.rb +24 -2
- data/lib/docgenerator/tabular.rb +59 -14
- data/lib/docgenerator/templates/docgenerator_template.rb +1 -0
- data/lib/docgenerator/templates/docgenerator_template.yaml +30 -1
- data/lib/docgenerator/version.rb +13 -1
- data/meta_test_and_doc/build__meta.rb +3 -10
- data/meta_test_and_doc/build_doc.rb +4 -2
- data/meta_test_and_doc/build_test.rb +21 -17
- data/meta_test_and_doc/manpages/images.rb +152 -0
- data/unittest/expected/test_document_toc_article.latex +6 -6
- data/unittest/expected_struktex/test_struktex_krug.creole +5 -5
- data/unittest/expected_struktex/test_struktex_krug.wiki +5 -5
- data/unittest/expected_struktex/test_struktex_statement.creole +4 -4
- data/unittest/expected_struktex/test_struktex_statement.wiki +4 -4
- data/unittest/expected_templates/test_report_utf8.tex +34 -0
- data/unittest/expected_templates/test_standalone.tex +2 -1
- data/unittest/unittest_docgenerator.rb +37 -30
- data/unittest/unittest_docgenerator_characters.rb +113 -60
- data/unittest/unittest_docgenerator_runtex.rb +16 -12
- data/unittest/unittest_packages_multicol.rb +4 -9
- data/unittest/unittest_packages_struktex.rb +66 -90
- data/unittest/unittest_rubycode4doc.rb +38 -241
- data/unittest/unittest_templates.rb +4 -8
- metadata +23 -560
- data/examples/creole_example.rb +0 -81
- data/examples/creole_example_footnote.rb +0 -67
- data/examples/creole_example_new_plugin.rb +0 -51
- data/examples/creole_example_placeholder.rb +0 -77
- data/examples/creole_example_rail.rb +0 -154
- data/examples/creole_example_rubycode.rb +0 -144
- data/examples/creole_example_struktex.rb +0 -169
- data/examples/creole_example_tabular.rb +0 -97
- data/examples/wiki2docgenerator_example.rb +0 -299
- data/lib/creole/creole2doc.rb +0 -954
- data/lib/creole/creole_characters.rb +0 -120
- data/lib/creole/creole_inclusion_and_plugins.rb +0 -96
- data/lib/creole/creole_inclusions.rb +0 -154
- data/lib/creole/creole_placeholder.rb +0 -171
- data/lib/creole/creole_plugins.rb +0 -230
- data/lib/creole/creole_tabular.rb +0 -401
- data/lib/creole/plugins/rail.rb +0 -181
- data/lib/creole/plugins/rubycode4creole.rb +0 -136
- data/lib/creole/plugins/struktex.rb +0 -59
- data/lib/creole/plugins/todonotes.rb +0 -77
- data/lib/wiki2doc/plugins/rubycode4wiki.rb +0 -53
- data/lib/wiki2doc/plugins/struktex.rb +0 -12
- data/lib/wiki2doc/wiki2docgenerator.rb +0 -1276
- data/lib/wiki2doc/wikimedia_document.rb +0 -24
- data/meta_test_and_doc/manpages/packages.rb +0 -13
- data/unittest/Red_Flower.jpg +0 -0
- data/unittest/creole1.0test.txt +0 -128
- data/unittest/creole_testtext.creole +0 -11
- data/unittest/expected_creole/test_creole.html +0 -3
- data/unittest/expected_creole/test_creole_characters_all.creole +0 -28
- data/unittest/expected_creole/test_creole_characters_all.html +0 -18
- data/unittest/expected_creole/test_creole_characters_all.latex +0 -36
- data/unittest/expected_creole/test_creole_characters_special.html +0 -10
- data/unittest/expected_creole/test_creole_characters_special.latex +0 -18
- data/unittest/expected_creole/test_creole_comment.context +0 -11
- data/unittest/expected_creole/test_creole_comment.creole +0 -12
- data/unittest/expected_creole/test_creole_comment.html +0 -9
- data/unittest/expected_creole/test_creole_comment.latex +0 -11
- data/unittest/expected_creole/test_creole_countdown.html +0 -3
- data/unittest/expected_creole/test_creole_countdown.latex +0 -4
- data/unittest/expected_creole/test_creole_creole1.0test.html +0 -182
- data/unittest/expected_creole/test_creole_creole1.0test.latex +0 -253
- data/unittest/expected_creole/test_creole_creole1.0test.text +0 -160
- data/unittest/expected_creole/test_creole_footnotes.html +0 -9
- data/unittest/expected_creole/test_creole_footnotes.latex +0 -14
- data/unittest/expected_creole/test_creole_footnotes_groupid.html +0 -15
- data/unittest/expected_creole/test_creole_footnotes_label.html +0 -9
- data/unittest/expected_creole/test_creole_headings.html +0 -17
- data/unittest/expected_creole/test_creole_headings.latex +0 -19
- data/unittest/expected_creole/test_creole_headings.text +0 -48
- data/unittest/expected_creole/test_creole_headings.wiki +0 -37
- data/unittest/expected_creole/test_creole_hr.html +0 -7
- data/unittest/expected_creole/test_creole_hr.latex +0 -9
- data/unittest/expected_creole/test_creole_hr.text +0 -4
- data/unittest/expected_creole/test_creole_ignore.html +0 -3
- data/unittest/expected_creole/test_creole_ignore.latex +0 -4
- data/unittest/expected_creole/test_creole_ignore.text +0 -2
- data/unittest/expected_creole/test_creole_inline.html +0 -3
- data/unittest/expected_creole/test_creole_inline.latex +0 -4
- data/unittest/expected_creole/test_creole_inline.text +0 -2
- data/unittest/expected_creole/test_creole_inline_apostroph.html +0 -6
- data/unittest/expected_creole/test_creole_inline_apostroph.latex +0 -8
- data/unittest/expected_creole/test_creole_inline_apostroph.text +0 -4
- data/unittest/expected_creole/test_creole_inline_ruby.html +0 -12
- data/unittest/expected_creole/test_creole_inline_ruby.latex +0 -20
- data/unittest/expected_creole/test_creole_inline_ruby_raw.html +0 -6
- data/unittest/expected_creole/test_creole_inline_ruby_raw.latex +0 -8
- data/unittest/expected_creole/test_creole_input.normsource +0 -25
- data/unittest/expected_creole/test_creole_input.normsource_1.8 +0 -23
- data/unittest/expected_creole/test_creole_input_file_simple.html +0 -15
- data/unittest/expected_creole/test_creole_input_file_simple_readlines.html +0 -15
- data/unittest/expected_creole/test_creole_label.html +0 -12
- data/unittest/expected_creole/test_creole_label.latex +0 -15
- data/unittest/expected_creole/test_creole_line_break.html +0 -6
- data/unittest/expected_creole/test_creole_line_break.latex +0 -8
- data/unittest/expected_creole/test_creole_links_explicit_internal.html +0 -6
- data/unittest/expected_creole/test_creole_links_explicit_internal.text +0 -4
- data/unittest/expected_creole/test_creole_links_explicit_with_em.html +0 -3
- data/unittest/expected_creole/test_creole_links_explicit_with_em.latex +0 -4
- data/unittest/expected_creole/test_creole_links_explicit_with_em.text +0 -2
- data/unittest/expected_creole/test_creole_links_external.html +0 -6
- data/unittest/expected_creole/test_creole_links_external.latex +0 -8
- data/unittest/expected_creole/test_creole_links_external.text +0 -4
- data/unittest/expected_creole/test_creole_links_external_implicit.html +0 -9
- data/unittest/expected_creole/test_creole_links_external_implicit.latex +0 -12
- data/unittest/expected_creole/test_creole_links_external_implicit.text +0 -6
- data/unittest/expected_creole/test_creole_links_file.html +0 -6
- data/unittest/expected_creole/test_creole_links_file.latex +0 -8
- data/unittest/expected_creole/test_creole_links_file.text +0 -4
- data/unittest/expected_creole/test_creole_links_implicit_end.creole +0 -4
- data/unittest/expected_creole/test_creole_links_implicit_end.html +0 -3
- data/unittest/expected_creole/test_creole_links_implicit_end.latex +0 -4
- data/unittest/expected_creole/test_creole_list_ol.html +0 -12
- data/unittest/expected_creole/test_creole_list_ol.latex +0 -22
- data/unittest/expected_creole/test_creole_list_ol_after_ul.html +0 -12
- data/unittest/expected_creole/test_creole_list_ol_after_ul.latex +0 -20
- data/unittest/expected_creole/test_creole_list_ol_after_ul.text +0 -6
- data/unittest/expected_creole/test_creole_list_ol_ul.html +0 -15
- data/unittest/expected_creole/test_creole_list_ol_ul.latex +0 -26
- data/unittest/expected_creole/test_creole_list_ul.html +0 -22
- data/unittest/expected_creole/test_creole_list_ul.latex +0 -40
- data/unittest/expected_creole/test_creole_list_ul.normsource +0 -89
- data/unittest/expected_creole/test_creole_list_ul.normsource_1.8 +0 -83
- data/unittest/expected_creole/test_creole_list_ul_too_much.html +0 -24
- data/unittest/expected_creole/test_creole_list_ul_too_much.latex +0 -44
- data/unittest/expected_creole/test_creole_list_ulul_without_ul.html +0 -6
- data/unittest/expected_creole/test_creole_list_ulul_without_ul.latex +0 -12
- data/unittest/expected_creole/test_creole_mix_titles_list.html +0 -10
- data/unittest/expected_creole/test_creole_mix_titles_list.latex +0 -18
- data/unittest/expected_creole/test_creole_mix_titles_list.text +0 -12
- data/unittest/expected_creole/test_creole_newline.html +0 -9
- data/unittest/expected_creole/test_creole_newline.latex +0 -11
- data/unittest/expected_creole/test_creole_newline.text +0 -7
- data/unittest/expected_creole/test_creole_paragraphs.html +0 -6
- data/unittest/expected_creole/test_creole_paragraphs.latex +0 -8
- data/unittest/expected_creole/test_creole_paragraphs.normsource +0 -29
- data/unittest/expected_creole/test_creole_paragraphs.normsource_1.8 +0 -27
- data/unittest/expected_creole/test_creole_paragraphs.text +0 -4
- data/unittest/expected_creole/test_creole_paragraphs.wiki +0 -4
- data/unittest/expected_creole/test_creole_paragraphs_wrap.html +0 -5
- data/unittest/expected_creole/test_creole_paragraphs_wrap.latex +0 -6
- data/unittest/expected_creole/test_creole_paragraphs_wrap.text +0 -4
- data/unittest/expected_creole/test_creole_paragraphs_wrap.wiki +0 -4
- data/unittest/expected_creole/test_creole_paragraphs_wrap0.html +0 -9
- data/unittest/expected_creole/test_creole_paragraphs_wrap0.latex +0 -11
- data/unittest/expected_creole/test_creole_paragraphs_wrap0.text +0 -7
- data/unittest/expected_creole/test_creole_paragraphs_wrap0.wiki +0 -7
- data/unittest/expected_creole/test_creole_paragraphs_wrap60.html +0 -5
- data/unittest/expected_creole/test_creole_paragraphs_wrap60.latex +0 -6
- data/unittest/expected_creole/test_creole_paragraphs_wrap60.text +0 -4
- data/unittest/expected_creole/test_creole_paragraphs_wrap60.wiki +0 -4
- data/unittest/expected_creole/test_creole_picture_link.html +0 -6
- data/unittest/expected_creole/test_creole_pictures.html +0 -10
- data/unittest/expected_creole/test_creole_pictures.latex +0 -13
- data/unittest/expected_creole/test_creole_pictures_css.html +0 -6
- data/unittest/expected_creole/test_creole_pictures_css.latex +0 -8
- data/unittest/expected_creole/test_creole_pictures_imgclass.html +0 -6
- data/unittest/expected_creole/test_creole_pictures_imgclass.latex +0 -8
- data/unittest/expected_creole/test_creole_pictures_longdesc.html +0 -3
- data/unittest/expected_creole/test_creole_pictures_width.html +0 -3
- data/unittest/expected_creole/test_creole_pictures_width.latex +0 -4
- data/unittest/expected_creole/test_creole_placeholders_html.html +0 -7
- data/unittest/expected_creole/test_creole_placeholders_html.latex +0 -8
- data/unittest/expected_creole/test_creole_placeholders_html.text +0 -4
- data/unittest/expected_creole/test_creole_placeholders_latex.html +0 -6
- data/unittest/expected_creole/test_creole_placeholders_latex.latex +0 -9
- data/unittest/expected_creole/test_creole_placeholders_latex.text +0 -4
- data/unittest/expected_creole/test_creole_short_html.html +0 -3
- data/unittest/expected_creole/test_creole_short_html.latex +0 -4
- data/unittest/expected_creole/test_creole_short_html.text +0 -2
- data/unittest/expected_creole/test_creole_shy.creole +0 -6
- data/unittest/expected_creole/test_creole_shy.html +0 -6
- data/unittest/expected_creole/test_creole_shy.latex +0 -8
- data/unittest/expected_creole/test_creole_shy.text +0 -4
- data/unittest/expected_creole/test_creole_tabular.creole +0 -22
- data/unittest/expected_creole/test_creole_tabular.html +0 -20
- data/unittest/expected_creole/test_creole_tabular.latex +0 -22
- data/unittest/expected_creole/test_creole_tabular_creole.creole +0 -19
- data/unittest/expected_creole/test_creole_tabular_creole.html +0 -18
- data/unittest/expected_creole/test_creole_tabular_creole.latex +0 -19
- data/unittest/expected_creole/test_creole_tabular_css.creole +0 -24
- data/unittest/expected_creole/test_creole_tabular_css.html +0 -20
- data/unittest/expected_creole/test_creole_tabular_css.latex +0 -22
- data/unittest/expected_creole/test_creole_tabular_multicols.creole +0 -16
- data/unittest/expected_creole/test_creole_tabular_multicols.html +0 -14
- data/unittest/expected_creole/test_creole_tabular_multicols.latex +0 -16
- data/unittest/expected_creole/test_creole_tabular_row_parameters.latex +0 -22
- data/unittest/expected_creole/test_creole_tabular_with_cell_option.creole +0 -21
- data/unittest/expected_creole/test_creole_tabular_with_cell_option.html +0 -20
- data/unittest/expected_creole/test_creole_toc.html +0 -13
- data/unittest/expected_creole/test_creole_toc.latex +0 -22
- data/unittest/expected_creole/test_creole_toc.text +0 -4
- data/unittest/expected_creole/test_creole_toc_level.html +0 -7
- data/unittest/expected_creole/test_creole_toc_level.latex +0 -10
- data/unittest/expected_creole/test_creole_toc_level.text +0 -3
- data/unittest/expected_creole/test_creole_toc_level_text.html +0 -8
- data/unittest/expected_creole/test_creole_toc_level_text.latex +0 -9
- data/unittest/expected_creole/test_creole_toc_text.html +0 -5
- data/unittest/expected_creole/test_creole_toc_text.latex +0 -5
- data/unittest/expected_creole/test_creole_ul_multiple_line.html +0 -7
- data/unittest/expected_creole/test_creole_ul_multiple_line.latex +0 -14
- data/unittest/expected_creole/test_creole_ul_with_blank.html +0 -11
- data/unittest/expected_creole/test_creole_ul_with_blank.latex +0 -20
- data/unittest/expected_creole/test_creole_ul_with_bold.creole +0 -0
- data/unittest/expected_creole/test_creole_ul_with_bold.html +0 -11
- data/unittest/expected_creole/test_creole_ul_with_bold.latex +0 -18
- data/unittest/expected_creole/test_creole_ul_with_bold.text +0 -7
- data/unittest/expected_creole/test_creole_verbatim.html +0 -25
- data/unittest/expected_creole/test_creole_verbatim.latex +0 -33
- data/unittest/expected_creole/test_creole_verbatim.text +0 -17
- data/unittest/expected_creole/test_creole_verbatim_inline.html +0 -6
- data/unittest/expected_creole/test_creole_verbatim_inline.latex +0 -8
- data/unittest/expected_creole/test_creole_verbatim_inline_at_start.html +0 -6
- data/unittest/expected_creole/test_creole_verbatim_inline_at_start.latex +0 -8
- data/unittest/expected_creole_rail/test_rail_creole_object.tex +0 -33
- data/unittest/expected_creole_rail/test_rail_creole_placeholder.tex +0 -40
- data/unittest/expected_rubycode4doc/creole_complete.html +0 -26
- data/unittest/expected_rubycode4doc/creole_complete.tex +0 -40
- data/unittest/expected_rubycode4doc/creole_in_tab.html +0 -4
- data/unittest/expected_rubycode4doc/creole_in_tab.tex +0 -6
- data/unittest/expected_rubycode4doc/creole_inline_ruby.html +0 -7
- data/unittest/expected_rubycode4doc/creole_output.html +0 -2
- data/unittest/expected_rubycode4doc/creole_output.tex +0 -4
- data/unittest/expected_rubycode4doc/creole_rubycode.html +0 -1
- data/unittest/expected_rubycode4doc/creole_rubycode.tex +0 -3
- data/unittest/expected_rubycode4doc/creole_rubycode_evaluated.html +0 -1
- data/unittest/expected_rubycode4doc/creole_rubycode_evaluated.tex +0 -3
- data/unittest/expected_rubycode4doc/creole_rubycode_evaluated_listings.html +0 -3
- data/unittest/expected_rubycode4doc/creole_rubycode_evaluated_listings.tex +0 -5
- data/unittest/expected_rubycode4doc/wiki_1.html +0 -8
- data/unittest/expected_rubycode4doc/wiki_2.html +0 -8
- data/unittest/expected_rubycode4doc/wiki_3.html +0 -9
- data/unittest/expected_rubycode4doc/wiki_immediate_1.html +0 -5
- data/unittest/expected_rubycode4doc/wiki_immediate_2.html +0 -5
- data/unittest/expected_rubycode4doc/wiki_immediate_3.html +0 -8
- data/unittest/expected_rubycode4doc/wiki_immediate_full.html +0 -21
- data/unittest/expected_wikimedia/test_wiki.html +0 -6
- data/unittest/expected_wikimedia/test_wiki.latex +0 -12
- data/unittest/expected_wikimedia/test_wiki.text +0 -14
- data/unittest/expected_wikimedia/test_wiki.wiki +0 -12
- data/unittest/expected_wikimedia/test_wiki_description.html +0 -7
- data/unittest/expected_wikimedia/test_wiki_description.latex +0 -11
- data/unittest/expected_wikimedia/test_wiki_description.text +0 -6
- data/unittest/expected_wikimedia/test_wiki_description.wiki +0 -6
- data/unittest/expected_wikimedia/test_wiki_footnote.html +0 -8
- data/unittest/expected_wikimedia/test_wiki_footnote.latex +0 -17
- data/unittest/expected_wikimedia/test_wiki_footnote.text +0 -10
- data/unittest/expected_wikimedia/test_wiki_footnote.wiki +0 -10
- data/unittest/expected_wikimedia/test_wiki_footnote_2.html +0 -8
- data/unittest/expected_wikimedia/test_wiki_footnote_groupid.html +0 -21
- data/unittest/expected_wikimedia/test_wiki_html_code.html +0 -7
- data/unittest/expected_wikimedia/test_wiki_html_code.latex +0 -10
- data/unittest/expected_wikimedia/test_wiki_html_code.text +0 -6
- data/unittest/expected_wikimedia/test_wiki_html_code.wiki +0 -6
- data/unittest/expected_wikimedia/test_wiki_inline.html +0 -6
- data/unittest/expected_wikimedia/test_wiki_inline.latex +0 -12
- data/unittest/expected_wikimedia/test_wiki_inline.text +0 -8
- data/unittest/expected_wikimedia/test_wiki_inline.wiki +0 -8
- data/unittest/expected_wikimedia/test_wiki_label.html +0 -6
- data/unittest/expected_wikimedia/test_wiki_link.html +0 -8
- data/unittest/expected_wikimedia/test_wiki_link.latex +0 -17
- data/unittest/expected_wikimedia/test_wiki_link.wiki +0 -11
- data/unittest/expected_wikimedia/test_wiki_list_ol.html +0 -24
- data/unittest/expected_wikimedia/test_wiki_list_ol.latex +0 -30
- data/unittest/expected_wikimedia/test_wiki_list_ol.text +0 -10
- data/unittest/expected_wikimedia/test_wiki_list_ol.wiki +0 -12
- data/unittest/expected_wikimedia/test_wiki_list_ol_after_ul.html +0 -16
- data/unittest/expected_wikimedia/test_wiki_list_ol_after_ul.latex +0 -24
- data/unittest/expected_wikimedia/test_wiki_list_ol_after_ul.text +0 -8
- data/unittest/expected_wikimedia/test_wiki_list_ol_after_ul.wiki +0 -10
- data/unittest/expected_wikimedia/test_wiki_list_ol_ul.html +0 -24
- data/unittest/expected_wikimedia/test_wiki_list_ol_ul.latex +0 -30
- data/unittest/expected_wikimedia/test_wiki_list_ol_ul.text +0 -10
- data/unittest/expected_wikimedia/test_wiki_list_ol_ul.wiki +0 -12
- data/unittest/expected_wikimedia/test_wiki_list_ul.html +0 -24
- data/unittest/expected_wikimedia/test_wiki_list_ul.latex +0 -30
- data/unittest/expected_wikimedia/test_wiki_list_ul.text +0 -10
- data/unittest/expected_wikimedia/test_wiki_list_ul.wiki +0 -12
- data/unittest/expected_wikimedia/test_wiki_list_ul_too_much.html +0 -39
- data/unittest/expected_wikimedia/test_wiki_list_ul_too_much.latex +0 -51
- data/unittest/expected_wikimedia/test_wiki_list_ul_too_much.text +0 -11
- data/unittest/expected_wikimedia/test_wiki_list_ul_too_much.wiki +0 -15
- data/unittest/expected_wikimedia/test_wiki_picture.html +0 -55
- data/unittest/expected_wikimedia/test_wiki_picture.latex +0 -76
- data/unittest/expected_wikimedia/test_wiki_picture_thumb.html +0 -5
- data/unittest/expected_wikimedia/test_wiki_tab1.html +0 -30
- data/unittest/expected_wikimedia/test_wiki_tab1.latex +0 -30
- data/unittest/expected_wikimedia/test_wiki_tab1.wiki +0 -29
- data/unittest/expected_wikimedia/test_wiki_textformatting.html +0 -7
- data/unittest/expected_wikimedia/test_wiki_textformatting.latex +0 -16
- data/unittest/expected_wikimedia/test_wiki_textformatting.text +0 -11
- data/unittest/expected_wikimedia/test_wiki_textformatting.wiki +0 -9
- data/unittest/expected_wikimedia/test_wiki_toc.html +0 -9
- data/unittest/expected_wikimedia/test_wiki_toc.latex +0 -18
- data/unittest/expected_wikimedia/test_wiki_toc.text +0 -21
- data/unittest/expected_wikimedia/test_wiki_toc.wiki +0 -18
- data/unittest/expected_wikimedia/test_wiki_ul_multiple_line.html +0 -18
- data/unittest/expected_wikimedia/test_wiki_ul_multiple_line.latex +0 -19
- data/unittest/expected_wikimedia/test_wiki_ul_multiple_line.text +0 -6
- data/unittest/expected_wikimedia/test_wiki_ul_multiple_line.wiki +0 -7
- data/unittest/unittest_creole.rb +0 -1361
- data/unittest/unittest_creole_placeholders.rb +0 -150
- data/unittest/unittest_creole_plugin_rail.rb +0 -147
- data/unittest/unittest_creole_tabular.rb +0 -207
- data/unittest/unittest_wikimedia.rb +0 -479
@@ -1,6 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
=begin rdoc
|
2
|
+
This parts are deprecated and should be replaced.
|
3
|
+
=end
|
4
|
+
gem 'minitest-filecontent'
|
5
|
+
require 'minitest/filecontent.rb'
|
4
6
|
|
5
7
|
if $0 == __FILE__
|
6
8
|
$:.unshift("../lib")
|
@@ -33,7 +35,7 @@ Clear message array and return messages
|
|
33
35
|
end #ArrayOutputter
|
34
36
|
|
35
37
|
|
36
|
-
class Test_document_runtex < Test
|
38
|
+
class Test_document_runtex < MiniTest::Test
|
37
39
|
def clean_examples()
|
38
40
|
%w{test_runtex test_runtex_2}.each{|filename|
|
39
41
|
%w{tex pdf aux log out}.each{|ext|
|
@@ -61,16 +63,17 @@ class Test_document_runtex < Test::Unit::TestCase
|
|
61
63
|
doc.body << element(:p,{}, 'This is some content' )
|
62
64
|
#~ doc.save('test_document.html')
|
63
65
|
assert_instance_of( Log4r::Logger, doc.log)
|
64
|
-
|
66
|
+
refute_same( DOCGENERATOR_LOGGER, doc.log)
|
65
67
|
|
66
68
|
filename = "#{__method__}.tex"
|
67
69
|
|
68
70
|
assert_equal(false, File.exist?(filename))
|
69
71
|
assert_equal(false, File.exist?(filename.ext('pdf')))
|
70
72
|
|
71
|
-
assert_equal_filecontent( "expected/test_runtex.stdout",
|
72
|
-
|
73
|
-
)
|
73
|
+
#~ assert_equal_filecontent( "expected/test_runtex.stdout",
|
74
|
+
#~ catch_stdout(Proc.new{ doc.save(filename, :runtex => [:statistic]) } )
|
75
|
+
#~ )
|
76
|
+
assert_output(File.read("expected/test_runtex.stdout")){ doc.save(filename, :runtex => [:statistic]) }
|
74
77
|
assert_equal([" INFO Doc: Save changed #{__method__}.tex\n"], @log.outputters.first.flush)
|
75
78
|
|
76
79
|
assert_equal(true, File.exist?(filename))
|
@@ -91,7 +94,7 @@ class Test_document_runtex < Test::Unit::TestCase
|
|
91
94
|
doc.body << element(:p,{}, 'This is some content' )
|
92
95
|
#~ doc.save('test_document.html')
|
93
96
|
assert_instance_of( Log4r::Logger, doc.log)
|
94
|
-
|
97
|
+
refute_same( DOCGENERATOR_LOGGER, doc.log)
|
95
98
|
|
96
99
|
filename = "#{__method__}.tex"
|
97
100
|
doc.runtex = [:statistic]
|
@@ -99,9 +102,10 @@ class Test_document_runtex < Test::Unit::TestCase
|
|
99
102
|
assert_equal(false, File.exist?(filename))
|
100
103
|
assert_equal(false, File.exist?(filename.ext('pdf')))
|
101
104
|
|
102
|
-
assert_equal_filecontent( "expected/test_runtex_2.stdout",
|
103
|
-
catch_stdout(Proc.new{ doc.save(filename) } )
|
104
|
-
)
|
105
|
+
#~ assert_equal_filecontent( "expected/test_runtex_2.stdout",
|
106
|
+
#~ catch_stdout(Proc.new{ doc.save(filename) } )
|
107
|
+
#~ )
|
108
|
+
assert_output(File.read("expected/test_runtex_2.stdout")){ doc.save(filename) }
|
105
109
|
assert_equal([" INFO Doc: Save changed #{__method__}.tex\n"], @log.outputters.first.flush)
|
106
110
|
|
107
111
|
assert_equal(true, File.exist?(filename))
|
@@ -8,16 +8,11 @@ if $0 == __FILE__
|
|
8
8
|
$:.unshift("../lib")
|
9
9
|
end
|
10
10
|
|
11
|
-
gem '
|
12
|
-
require '
|
13
|
-
require 'more_unit_test/assert_equal_filecontent.rb'
|
11
|
+
gem 'minitest-filecontent'
|
12
|
+
require 'minitest/filecontent.rb'
|
14
13
|
|
15
14
|
require 'docgenerator'
|
16
15
|
require 'docgenerator/packages/multicol.rb'
|
17
|
-
#~ require 'creole/creole2doc'
|
18
|
-
#~ require 'creole/plugins/multicol.rb'
|
19
|
-
#~ require 'wiki2doc/wiki2docgenerator'
|
20
|
-
#~ require 'wiki2doc/plugins/multicol.rb'
|
21
16
|
|
22
17
|
|
23
18
|
#~ DOCGENERATOR_LOGGER.level = Log4r::DEBUG
|
@@ -35,7 +30,7 @@ OPT = { :log => Docgenerator::DOCGENERATOR_DEFAULT_LOGGER } unless defined? OPT
|
|
35
30
|
|
36
31
|
#~ include Log4r
|
37
32
|
|
38
|
-
class Test_multicol < Test
|
33
|
+
class Test_multicol < MiniTest::Test
|
39
34
|
def test_multicol_3
|
40
35
|
mcol = element(:multicols,{:colnum => 3},'Testcontent').cR
|
41
36
|
assert_equal_filecontent( "expected_packages/#{__method__}.tex", mcol.to_doc(:latex))
|
@@ -62,7 +57,7 @@ end
|
|
62
57
|
|
63
58
|
def newtest(name, withclass = false)
|
64
59
|
code = []
|
65
|
-
code << "class Test_multicol < Test
|
60
|
+
code << "class Test_multicol < MiniTest::Test" if withclass
|
66
61
|
code << <<-code
|
67
62
|
def test_multicol_#{name}()
|
68
63
|
mcol = ''
|
@@ -1,53 +1,39 @@
|
|
1
1
|
#
|
2
|
-
#Tests for creole/plugins//struktex.rb
|
3
|
-
#
|
4
2
|
#Check after __END__ for missing tests.
|
5
3
|
#
|
4
|
+
#These feature may be easier used with docgenerator-creole
|
5
|
+
#in combination with docgenerator/creole/plugins//struktex.rb
|
6
|
+
|
6
7
|
|
7
8
|
if $0 == __FILE__
|
8
9
|
$:.unshift("../lib")
|
9
10
|
end
|
10
11
|
|
11
|
-
gem '
|
12
|
-
require '
|
13
|
-
require '
|
14
|
-
|
15
|
-
require 'creole/creole2doc'
|
16
|
-
require 'creole/plugins/struktex.rb'
|
17
|
-
require 'wiki2doc/wiki2docgenerator'
|
18
|
-
require 'wiki2doc/plugins/struktex.rb'
|
19
|
-
|
12
|
+
gem 'minitest-filecontent'
|
13
|
+
require 'minitest/filecontent.rb'
|
14
|
+
require 'docgenerator/packages/struktex.rb'
|
20
15
|
|
21
16
|
#~ DOCGENERATOR_LOGGER.level = Log4r::DEBUG
|
22
17
|
#Avoid warnings about missing logger in to_doc
|
23
18
|
OPT = { :log => Docgenerator::DOCGENERATOR_DEFAULT_LOGGER } unless defined? OPT
|
24
19
|
|
25
|
-
#~ $log = Log4r::Logger.new( 'test struktex', Log4r::WARN )
|
26
|
-
#~ $log.outputters = Log4r::StdoutOutputter.new('test struktex')
|
27
|
-
#~ $log.level = Log4r::INFO
|
28
|
-
#~ $log.info("Remark: Known errors/problems and missing checks are logged.")
|
29
|
-
#~ DOCGENERATOR_LOGGER.level = Log4r::DEBUG
|
30
|
-
#~ DOCGENERATOR_LOGGER.level = Log4r::INFO
|
31
|
-
#~ DOCGENERATOR_LOGGER.level = Log4r::WARN
|
32
|
-
#~ DOCGENERATOR_LOGGER.level = Log4r::ERROR
|
33
|
-
|
34
20
|
#~ include Log4r
|
35
21
|
|
36
|
-
class Test_struktex < Test
|
22
|
+
class Test_struktex < MiniTest::Test
|
37
23
|
|
38
24
|
def test_struktex_krug()
|
39
25
|
struct = Docgenerator::Packages::Struktex::Structogramm.new('Krug', 120, 45, <<-cmd
|
40
|
-
WHILE
|
26
|
+
WHILE Krug nicht zerbrochen
|
41
27
|
Krug geht zum Brunnen
|
42
28
|
ENDWHILE
|
43
29
|
Qualitaetspruefung
|
44
|
-
|
45
|
-
|
46
|
-
IF
|
30
|
+
-> Krug Testgut
|
31
|
+
<- res_1 Pruefergebnis
|
32
|
+
IF Krug zerbrochen
|
47
33
|
THEN
|
48
34
|
Schade
|
49
35
|
ELSE
|
50
|
-
|
36
|
+
Stabiler Krug
|
51
37
|
ENDIF
|
52
38
|
cmd
|
53
39
|
)
|
@@ -60,10 +46,10 @@ class Test_struktex < Test::Unit::TestCase
|
|
60
46
|
|
61
47
|
def test_struktex_statement()
|
62
48
|
struct = Docgenerator::Packages::Struktex::Structogramm.new('Simple Statements', 120, 30, <<-cmd
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
49
|
+
Statement
|
50
|
+
=> Call procedure
|
51
|
+
<> Return value
|
52
|
+
<= Exit with return value
|
67
53
|
cmd
|
68
54
|
)
|
69
55
|
assert_equal_filecontent( "expected_struktex/#{__method__}.tex", struct.to_doc(:latex, OPT))
|
@@ -77,19 +63,9 @@ class Test_struktex < Test::Unit::TestCase
|
|
77
63
|
end #Test_struktex
|
78
64
|
|
79
65
|
|
80
|
-
class Test_struktex_creole < Test::Unit::TestCase
|
81
|
-
def test_struktex_collector()
|
82
|
-
assert_equal( Docgenerator::Creole::Creole_structogramm, Docgenerator::Creole::Placeholders['structogramm'])
|
83
|
-
assert_equal( Docgenerator::Creole::Creole_structogramm, Docgenerator::Creole::Placeholders::Collection['structogramm'])
|
84
|
-
#~ assert_kind_of( Placeholder, Creole::Placeholders['structogramm'])
|
85
|
-
end
|
86
|
-
end #Test_struktex
|
87
|
-
|
88
|
-
|
89
|
-
|
90
66
|
def newtest(name, withclass = false)
|
91
67
|
code = []
|
92
|
-
code << "class Test_struktex < Test
|
68
|
+
code << "class Test_struktex < MiniTest::Test" if withclass
|
93
69
|
code << <<-code
|
94
70
|
def test_struktex_#{name}()
|
95
71
|
struct = ''
|
@@ -112,76 +88,76 @@ __END__
|
|
112
88
|
With declarations you can define interfaces of sub-routines.
|
113
89
|
This declarations are part of the command
|
114
90
|
>>>structogramm{Declarations/Interfaces;120;25}
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
91
|
+
Statement
|
92
|
+
-> field1 description
|
93
|
+
<- field2 description
|
94
|
+
<-> field3 description
|
119
95
|
<<<
|
120
96
|
|
121
97
|
===IF-Statement===
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
98
|
+
IF Condition
|
99
|
+
THEN size text
|
100
|
+
ELSE size text
|
101
|
+
ENDIF
|
126
102
|
>>>structogramm{Test f�r IF;120;40}
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
103
|
+
IF Bedingung?
|
104
|
+
THEN 6 Ja
|
105
|
+
IF Andere Frage?
|
106
|
+
THEN
|
107
|
+
<= Ergebnis
|
108
|
+
ELSE
|
109
|
+
<= Anderes Ergebnis
|
110
|
+
ENDIF
|
111
|
+
ELSE 6 Nein
|
112
|
+
IF Andere Frage?
|
113
|
+
THEN 4
|
114
|
+
<= Ergebnis
|
115
|
+
ELSE 5
|
116
|
+
<= Anderes Ergebnis
|
117
|
+
ENDIF
|
118
|
+
ENDIF
|
143
119
|
<<<
|
144
120
|
|
145
121
|
===CASE-statements===
|
146
122
|
The first number after CASE defines the degree of the case-line.
|
147
123
|
|
148
124
|
The WHEN clause has an optional parameter:
|
149
|
-
*c
|
125
|
+
*c centered
|
150
126
|
*r right-aligned
|
151
127
|
>>>structogramm{CASE Statements;120;40}
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
128
|
+
CASE 5 variable
|
129
|
+
WHEN value1
|
130
|
+
Statement 1-1
|
131
|
+
Statement 1-2
|
132
|
+
WHEN[r] value2
|
133
|
+
Statement 2-1
|
134
|
+
Statement 2-2
|
135
|
+
WHEN[c] value3
|
136
|
+
Statement 3-1
|
137
|
+
Statement 3-2
|
138
|
+
WHEN value4
|
139
|
+
Statement 4-1
|
140
|
+
Statement 4-2
|
141
|
+
ENDCASE
|
166
142
|
<<<
|
167
143
|
===While-statements===
|
168
144
|
>>>structogramm{While Statements;120;15}
|
169
|
-
|
170
|
-
|
171
|
-
|
145
|
+
WHILE Condition
|
146
|
+
Statement
|
147
|
+
ENDWHILE
|
172
148
|
<<<
|
173
149
|
|
174
150
|
===Repeat-Until-statements===
|
175
151
|
>>>structogramm{Repeat-Until Statements;120;15}
|
176
|
-
|
177
|
-
|
178
|
-
|
152
|
+
REPEAT
|
153
|
+
Statement
|
154
|
+
UNTIL Condition
|
179
155
|
<<<
|
180
156
|
|
181
157
|
===FOREVER-Loop-statements===
|
182
158
|
>>>structogramm{FOREVER-Loop Statements;120;30}
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
159
|
+
FOREVER
|
160
|
+
Statement
|
161
|
+
<= Exit
|
162
|
+
ENDFOREVER
|
187
163
|
<<<
|
@@ -1,32 +1,24 @@
|
|
1
1
|
#~ require '../test_docgenerator.rb'
|
2
|
-
|
3
|
-
require '
|
2
|
+
gem 'minitest'
|
3
|
+
require 'minitest/autorun'
|
4
4
|
|
5
5
|
if $0 == __FILE__
|
6
6
|
$:.unshift("../lib")
|
7
7
|
end
|
8
8
|
|
9
9
|
require 'docgenerator/packages/rubycode4doc'
|
10
|
-
require 'creole/plugins/rubycode4creole'
|
11
|
-
require 'wiki2doc/plugins/rubycode4wiki'
|
12
10
|
|
13
|
-
#~ DOCGENERATOR_LOGGER.level = Log4r::DEBUG
|
14
|
-
#Avoid warnings about missing logger in to_doc
|
15
|
-
OPT = { :log => Docgenerator::DOCGENERATOR_DEFAULT_LOGGER } unless defined? OPT
|
16
|
-
|
17
|
-
#
|
18
|
-
#
|
19
11
|
#
|
20
|
-
class Test_rubycode4doc < Test
|
21
|
-
def test_codetest()
|
22
|
-
|
12
|
+
class Test_rubycode4doc < MiniTest::Test
|
13
|
+
def test_codetest()
|
14
|
+
testcode_sourcecode = <<-CODE
|
23
15
|
a = 5
|
24
16
|
b = a * 5
|
25
17
|
puts b
|
26
18
|
puts b + 3
|
27
19
|
CODE
|
28
20
|
|
29
|
-
|
21
|
+
testcode_evaluated = <<-CODE
|
30
22
|
a = 5 # -> 5
|
31
23
|
b = a * 5 # -> 25
|
32
24
|
puts b # => "25\\n"
|
@@ -39,236 +31,41 @@ def test_codetest()
|
|
39
31
|
28
|
40
32
|
CODE
|
41
33
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
34
|
+
codetest = Docgenerator::Rubycode::CodeTest.new('codetest', testcode_sourcecode )
|
35
|
+
|
36
|
+
assert_equal(testcode_sourcecode.chomp, codetest.sourcecode)
|
37
|
+
assert_equal(testcode_evaluated.chomp, codetest.code_evaluation)
|
38
|
+
assert_equal(testcode_output.chomp, codetest.output)
|
39
|
+
|
40
|
+
#Extend the code
|
41
|
+
codetest << <<-TEST
|
42
|
+
3.times{|i|
|
43
|
+
puts i
|
44
|
+
}
|
45
|
+
TEST
|
46
|
+
testcode_sourcecode << <<-CODE
|
47
|
+
3.times{|i|
|
48
|
+
puts i
|
49
|
+
}
|
50
|
+
CODE
|
51
|
+
testcode_evaluated << <<-CODE
|
52
|
+
3.times{|i|
|
53
|
+
puts i
|
54
|
+
} # -> 3 => "0\\n1\\n2\\n"
|
55
|
+
CODE
|
56
|
+
testcode_output << <<-CODE
|
65
57
|
0
|
66
58
|
1
|
67
59
|
2
|
68
|
-
|
69
|
-
|
70
|
-
assert_equal(testcode_sourcecode.chomp, codetest.sourcecode)
|
71
|
-
#15 was defined in original settings
|
72
|
-
assert_equal(testcode_evaluated.chomp, codetest.code_evaluation(15))
|
73
|
-
assert_equal(testcode_output.chomp, codetest.output)
|
74
|
-
|
75
|
-
assert_instance_of(Docgenerator::Tables::Tabular, codetest.code_in_tab)
|
76
|
-
assert_instance_of(Docgenerator::Listings::Lstlisting, codetest.code_evaluation_lstlisting)
|
77
|
-
|
78
|
-
end #test_codetest()
|
79
|
-
end
|
80
|
-
|
60
|
+
CODE
|
81
61
|
|
82
|
-
|
83
|
-
|
62
|
+
assert_equal(testcode_sourcecode.chomp, codetest.sourcecode)
|
63
|
+
#15 was defined in original settings
|
64
|
+
assert_equal(testcode_evaluated.chomp, codetest.code_evaluation(15))
|
65
|
+
assert_equal(testcode_output.chomp, codetest.output)
|
84
66
|
|
85
|
-
|
86
|
-
|
87
|
-
b = a * 5
|
88
|
-
puts b
|
89
|
-
puts b + 3
|
90
|
-
CODE
|
91
|
-
)
|
67
|
+
assert_instance_of(Docgenerator::Tables::Tabular, codetest.code_in_tab)
|
68
|
+
assert_instance_of(Docgenerator::Listings::Lstlisting, codetest.code_evaluation_lstlisting)
|
92
69
|
|
93
|
-
|
94
|
-
|
95
|
-
{{rubycode|codetest_wiki}}
|
96
|
-
wiki
|
97
|
-
)
|
98
|
-
wiki_2 = Docgenerator::Wikimedia::Rubywiki.new( :content => <<wiki
|
99
|
-
===Executed Coding===
|
100
|
-
{{rubycode_with_evaluation|codetest_wiki}}
|
101
|
-
wiki
|
102
|
-
)
|
103
|
-
wiki_3 = Docgenerator::Wikimedia::Rubywiki.new( :content => <<wiki
|
104
|
-
===Executed Coding in einer Tabelle===
|
105
|
-
{{rubycode_in_tab|codetest_wiki}}
|
106
|
-
wiki
|
107
|
-
)
|
108
|
-
|
109
|
-
assert_equal_filecontent( "expected_rubycode4doc/wiki_1.html", wiki_1.to_html(OPT) )
|
110
|
-
assert_equal_filecontent( "expected_rubycode4doc/wiki_2.html", wiki_2.to_html(OPT) )
|
111
|
-
assert_equal_filecontent( "expected_rubycode4doc/wiki_3.html", wiki_3.to_html(OPT) )
|
112
|
-
end #test_wikitest()
|
113
|
-
|
114
|
-
def test_wikitest_immediate()
|
115
|
-
#Code definieren (Kein output)
|
116
|
-
#Code wird unter dem Namen code_in_wiki abgelegt.
|
117
|
-
wiki = Docgenerator::Wikimedia::Rubywiki.new( :content => <<wiki
|
118
|
-
>>>rubycode{code_in_wiki}
|
119
|
-
1.upto(3){|i| puts i }
|
120
|
-
<<<
|
121
|
-
wiki
|
122
|
-
)
|
123
|
-
#Verwenden von code_in_wiki
|
124
|
-
wiki_1 = Docgenerator::Wikimedia::Rubywiki.new( :content => <<wiki
|
125
|
-
===Originalcoding===
|
126
|
-
{{rubycode|code_in_wiki}}
|
127
|
-
wiki
|
128
|
-
)
|
129
|
-
wiki_2 = Docgenerator::Wikimedia::Rubywiki.new( :content => <<wiki
|
130
|
-
===Executed Coding===
|
131
|
-
{{rubycode_with_evaluation|code_in_wiki}}
|
132
|
-
wiki
|
133
|
-
)
|
134
|
-
wiki_3 = Docgenerator::Wikimedia::Rubywiki.new( :content => <<wiki
|
135
|
-
===Executed Coding in a tabular===
|
136
|
-
{{rubycode_in_tab|code_in_wiki}}
|
137
|
-
wiki
|
138
|
-
)
|
139
|
-
|
140
|
-
assert_equal('', wiki.to_html(OPT))
|
141
|
-
assert_equal_filecontent( "expected_rubycode4doc/wiki_immediate_1.html", wiki_1.to_html(OPT))
|
142
|
-
assert_equal_filecontent( "expected_rubycode4doc/wiki_immediate_2.html", wiki_2.to_html(OPT))
|
143
|
-
assert_equal_filecontent( "expected_rubycode4doc/wiki_immediate_3.html", wiki_3.to_html(OPT))
|
144
|
-
|
145
|
-
wiki_full = Docgenerator::Wikimedia::Rubywiki.new( :content => <<wiki
|
146
|
-
==Code definition==
|
147
|
-
(Nothing to see)
|
148
|
-
>>>rubycode{code_in_wiki_full}
|
149
|
-
1.upto(3){|i| puts i * 2 }
|
150
|
-
<<<
|
151
|
-
|
152
|
-
==Code with evaluation==
|
153
|
-
{{rubycode|code_in_wiki_full}}
|
154
|
-
|
155
|
-
==Code with evaluation==
|
156
|
-
{{rubycode_with_evaluation|code_in_wiki_full}}
|
157
|
-
|
158
|
-
==Code with evaluation==
|
159
|
-
{{rubycode_in_tab|code_in_wiki_full}}
|
160
|
-
wiki
|
161
|
-
)
|
162
|
-
assert_equal_filecontent( "expected_rubycode4doc/wiki_immediate_full.html", wiki_full.to_html(OPT))
|
163
|
-
|
164
|
-
end #test_wikitest_immediate()
|
165
|
-
|
166
|
-
end #class Test_rubycode4doc_wiki
|
167
|
-
|
168
|
-
|
169
|
-
class Test_rubycode4doc_creole < Test::Unit::TestCase
|
170
|
-
#This is integrated in Creole
|
171
|
-
def test_creole_inline_ruby()
|
172
|
-
wiki = Docgenerator::Creole::Creole.new()
|
173
|
-
wiki << <<wiki
|
174
|
-
*1 + 1 = <<ruby|1+1>>
|
175
|
-
*1 + 1 = <<ruby_raw|1+1>>
|
176
|
-
wiki
|
177
|
-
assert_equal_filecontent( "expected_rubycode4doc/creole_inline_ruby.html", wiki.to_html(OPT))
|
178
|
-
end
|
179
|
-
#
|
180
|
-
#
|
181
|
-
def test_creole_rubycode()
|
182
|
-
wiki = Docgenerator::Creole::Creole.new()
|
183
|
-
wiki << <<wiki
|
184
|
-
<<<rubycode
|
185
|
-
1 + 1
|
186
|
-
>>>
|
187
|
-
wiki
|
188
|
-
assert_equal_filecontent( "expected_rubycode4doc/creole_rubycode.html", wiki.to_html(OPT))
|
189
|
-
assert_equal_filecontent( "expected_rubycode4doc/creole_rubycode.tex", wiki.to_latex(OPT))
|
190
|
-
end
|
191
|
-
|
192
|
-
def test_creole_rubycode_output()
|
193
|
-
wiki = Docgenerator::Creole::Creole.new()
|
194
|
-
wiki << <<wiki
|
195
|
-
<<<rubycode_output
|
196
|
-
1 + 1
|
197
|
-
puts 1 + 2
|
198
|
-
>>>
|
199
|
-
wiki
|
200
|
-
assert_equal_filecontent( "expected_rubycode4doc/creole_output.html", wiki.to_html(OPT))
|
201
|
-
assert_equal_filecontent( "expected_rubycode4doc/creole_output.tex", wiki.to_latex(OPT))
|
202
|
-
end
|
203
|
-
|
204
|
-
def test_creole_rubycode_evaluated()
|
205
|
-
wiki = Docgenerator::Creole::Creole.new()
|
206
|
-
wiki << <<wiki
|
207
|
-
<<<rubycode_evaluated
|
208
|
-
1 + 1
|
209
|
-
>>>
|
210
|
-
wiki
|
211
|
-
assert_equal_filecontent( "expected_rubycode4doc/creole_rubycode_evaluated.html", wiki.to_html(OPT))
|
212
|
-
assert_equal_filecontent( "expected_rubycode4doc/creole_rubycode_evaluated.tex", wiki.to_latex(OPT))
|
213
|
-
end
|
214
|
-
|
215
|
-
def test_creole_rubycode_evaluated_listings()
|
216
|
-
wiki = Docgenerator::Creole::Creole.new()
|
217
|
-
wiki << <<wiki
|
218
|
-
<<<rubycode_evaluated_listings
|
219
|
-
1 + 1
|
220
|
-
>>>
|
221
|
-
wiki
|
222
|
-
assert_equal_filecontent( "expected_rubycode4doc/creole_rubycode_evaluated_listings.html", wiki.to_html(OPT))
|
223
|
-
assert_equal_filecontent( "expected_rubycode4doc/creole_rubycode_evaluated_listings.tex", wiki.to_latex(OPT))
|
224
|
-
end
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
def test_creole_rubycode_in_tab()
|
229
|
-
wiki = Docgenerator::Creole::Creole.new()
|
230
|
-
wiki << <<wiki
|
231
|
-
<<<rubycode_in_tab
|
232
|
-
1 + 1
|
233
|
-
>>>
|
234
|
-
wiki
|
235
|
-
assert_equal_filecontent( "expected_rubycode4doc/creole_in_tab.html", wiki.to_html(OPT))
|
236
|
-
assert_equal_filecontent( "expected_rubycode4doc/creole_in_tab.tex", wiki.to_latex(OPT))
|
237
|
-
end
|
238
|
-
|
239
|
-
|
240
|
-
#
|
241
|
-
def test_creole_rubycode_complete()
|
242
|
-
wiki = Docgenerator::Creole::Creole.new()
|
243
|
-
wiki << <<wiki
|
244
|
-
rubycode
|
245
|
-
<<<rubycode
|
246
|
-
1 + 1
|
247
|
-
>>>
|
248
|
-
----
|
249
|
-
rubycode_output
|
250
|
-
<<<rubycode_output
|
251
|
-
puts 1 + 1
|
252
|
-
>>>
|
253
|
-
----
|
254
|
-
rubycode_evaluated
|
255
|
-
<<<rubycode_evaluated
|
256
|
-
1 + 1
|
257
|
-
>>>
|
258
|
-
----
|
259
|
-
rubycode_in_tab
|
260
|
-
<<<rubycode_in_tab
|
261
|
-
1 + 1
|
262
|
-
>>>
|
263
|
-
----
|
264
|
-
<<<rubycode_evaluated_listings
|
265
|
-
1 + 1
|
266
|
-
>>>
|
267
|
-
wiki
|
268
|
-
assert_equal_filecontent( "expected_rubycode4doc/creole_complete.html", wiki.to_html(OPT))
|
269
|
-
assert_equal_filecontent( "expected_rubycode4doc/creole_complete.tex", wiki.to_latex(OPT))
|
270
|
-
end
|
271
|
-
|
272
|
-
end #class Test_rubycode4doc_creole
|
273
|
-
|
274
|
-
__END__
|
70
|
+
end #test_codetest()
|
71
|
+
end
|