docgenerator 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/creole_example_tabular.rb +95 -0
- data/examples/docgenerator_example.rb +5 -5
- data/lib/creole/creole2doc.rb +28 -18
- data/lib/creole/creole_inclusions.rb +4 -4
- data/lib/creole/creole_placeholder.rb +4 -1
- data/lib/creole/creole_tabular.rb +173 -155
- data/lib/creole/plugins/rail.rb +118 -119
- data/lib/creole/plugins/struktex.rb +35 -35
- data/lib/creole/plugins/todonotes.rb +8 -1
- data/lib/docgenerator/attribute.rb +160 -160
- data/lib/docgenerator/characters.rb +343 -311
- data/lib/docgenerator/css.rb +167 -167
- data/lib/docgenerator/document.rb +525 -511
- data/lib/docgenerator/element.rb +316 -316
- data/lib/docgenerator/element_meta.rb +114 -114
- data/lib/docgenerator/elements.rb +19 -9
- data/lib/docgenerator/environments.rb +3 -1
- data/lib/docgenerator/lists.rb +177 -174
- data/lib/docgenerator/packages/hyperref.rb +74 -70
- data/lib/docgenerator/packages/multicol.rb +33 -0
- data/lib/docgenerator/packages/scrlettr2.rb +152 -151
- data/lib/docgenerator/packages/todonotes.rb +1 -1
- data/lib/docgenerator/tabular.rb +463 -400
- data/lib/docgenerator/templates/docgenerator_template.rb +94 -84
- data/lib/docgenerator/templates/docgenerator_template.yaml +75 -15
- data/lib/docgenerator.rb +1 -1
- data/lib/wiki2doc/wiki2docgenerator.rb +1 -1
- data/meta_test_and_doc/build__meta.rb +125 -0
- data/meta_test_and_doc/build_doc.rb +333 -0
- data/meta_test_and_doc/build_test.rb +251 -0
- data/meta_test_and_doc/manpages/attachfile.rb +389 -0
- data/meta_test_and_doc/manpages/caption.rb +133 -0
- data/meta_test_and_doc/manpages/characters.rb +3738 -0
- data/meta_test_and_doc/manpages/elements.rb +6851 -0
- data/meta_test_and_doc/manpages/environments.rb +985 -0
- data/meta_test_and_doc/manpages/footnote.rb +439 -0
- data/meta_test_and_doc/manpages/hyperref.rb +605 -0
- data/meta_test_and_doc/manpages/listings.rb +988 -0
- data/meta_test_and_doc/manpages/lists.rb +1463 -0
- data/meta_test_and_doc/manpages/others.rb +129 -0
- data/meta_test_and_doc/manpages/packages.rb +13 -0
- data/meta_test_and_doc/manpages/pdfpages.rb +108 -0
- data/meta_test_and_doc/manpages/readme.rdoc +9 -0
- data/meta_test_and_doc/manpages/scrlettr2.rb +362 -0
- data/meta_test_and_doc/manpages/scrpage2.rb +2028 -0
- data/meta_test_and_doc/manpages/sectioning.rb +2467 -0
- data/meta_test_and_doc/manpages/tables.rb +2088 -0
- data/meta_test_and_doc/manpages/todonotes.rb +235 -0
- data/meta_test_and_doc/manpages/wiki2docgenerator.rb +64 -0
- data/{readme.rd → readme.rdoc} +18 -1
- data/unittest/expected/test_tabular.creole +33 -0
- data/unittest/expected_creole/test_creole_creole1.0test.html +3 -3
- data/unittest/expected_creole/test_creole_creole1.0test.latex +3 -3
- data/unittest/expected_creole/test_creole_creole1.0test.text +3 -3
- data/unittest/expected_creole/test_creole_inline_apostroph.html +6 -0
- data/unittest/expected_creole/test_creole_inline_apostroph.latex +8 -0
- data/unittest/expected_creole/test_creole_inline_apostroph.text +4 -0
- data/unittest/expected_creole/test_creole_input.normsource +12 -12
- data/unittest/expected_creole/test_creole_input.normsource_1.8 +23 -0
- data/unittest/expected_creole/test_creole_links_external_implicit.html +2 -2
- data/unittest/expected_creole/test_creole_links_external_implicit.latex +2 -2
- data/unittest/expected_creole/test_creole_links_external_implicit.text +2 -2
- data/unittest/expected_creole/test_creole_links_implicit_end.html +1 -1
- data/unittest/expected_creole/test_creole_links_implicit_end.latex +1 -1
- data/unittest/expected_creole/test_creole_list_ul.normsource +42 -42
- data/unittest/expected_creole/test_creole_list_ul.normsource_1.8 +83 -0
- data/unittest/expected_creole/test_creole_paragraphs.normsource +15 -15
- data/unittest/expected_creole/test_creole_paragraphs.normsource_1.8 +27 -0
- data/unittest/expected_creole/test_creole_tabular.creole +22 -0
- data/unittest/expected_creole/test_creole_tabular_creole.creole +19 -0
- data/unittest/expected_creole/test_creole_tabular_css.creole +24 -0
- data/unittest/expected_creole/test_creole_tabular_multicols.creole +16 -0
- data/unittest/expected_creole/test_creole_tabular_multicols.html +14 -0
- data/unittest/expected_creole/test_creole_tabular_multicols.latex +16 -0
- data/unittest/expected_creole/test_creole_tabular_with_cell_option.creole +21 -0
- data/unittest/expected_creole/test_creole_toc_level_text.html +2 -2
- data/unittest/expected_creole/test_creole_toc_level_text.latex +2 -2
- data/unittest/expected_packages/test_multicol_3.tex +2 -0
- data/unittest/expected_packages/test_multicol_3_titleline.tex +2 -0
- data/unittest/expected_templates/test_article.tex +23 -0
- data/unittest/expected_templates/test_article_utf8.tex +34 -0
- data/unittest/expected_templates/test_context.miv +18 -0
- data/unittest/expected_templates/test_creole.creole +8 -0
- data/unittest/expected_templates/test_html.html +12 -0
- data/unittest/expected_templates/test_html401_strict.html +14 -0
- data/unittest/expected_templates/test_html401_trans.html +14 -0
- data/unittest/expected_templates/test_html_utf8.html +14 -0
- data/unittest/expected_templates/test_include.tex +17 -0
- data/unittest/expected_templates/test_include_utf8.tex +17 -0
- data/unittest/expected_templates/test_text.txt +6 -0
- data/unittest/expected_templates/test_wiki.wiki +6 -0
- data/unittest/expected_templates/test_xhtml_strict.html +14 -0
- data/unittest/expected_templates/test_xhtml_trans.html +14 -0
- data/unittest/unittest_creole.rb +27 -6
- data/unittest/unittest_creole_placeholders.rb +1 -123
- data/unittest/unittest_creole_tabular.rb +174 -0
- data/unittest/unittest_docgenerator.rb +4 -3
- data/unittest/unittest_docgenerator_characters.rb +4769 -615
- data/unittest/unittest_packages_multicol.rb +84 -0
- data/unittest/unittest_rubycode4doc.rb +0 -1
- data/unittest/unittest_templates.rb +64 -0
- metadata +163 -77
- data/build_test_and_doc.rb +0 -505
- data/manpage_elements.rb +0 -10411
data/unittest/unittest_creole.rb
CHANGED
@@ -77,9 +77,10 @@ creole
|
|
77
77
|
creole = Docgenerator::Creole::Creole.new(:content => source )
|
78
78
|
assert_equal( [source], creole.source)
|
79
79
|
|
80
|
-
|
80
|
+
#ruby 1.8: symbols as key, ruby 1.9: Strings
|
81
|
+
#~ omit_if( RUBY_VERSION !~ /1.9/, "Wrong ruby version #{RUBY_VERSION}"){
|
81
82
|
assert_equal_filecontent( "expected_creole/test_creole_input.normsource", creole.normsource.to_yaml)
|
82
|
-
}
|
83
|
+
#~ }
|
83
84
|
|
84
85
|
creole = Docgenerator::Creole::Creole.new(:content => source )
|
85
86
|
creole = Docgenerator::Creole::Creole.new()
|
@@ -193,9 +194,10 @@ creole
|
|
193
194
|
$log.info('test_creole_paragraphs: uncomplete to_creole')
|
194
195
|
assert_equal_filecontent( "expected_creole/test_creole_paragraphs.text", creole.to_doc(:text, @opt))
|
195
196
|
|
196
|
-
|
197
|
+
#ruby 1.8: symbols as key, ruby 1.9: Strings
|
198
|
+
#~ omit_if( RUBY_VERSION !~ /1.9/, "Wrong ruby version #{RUBY_VERSION}"){
|
197
199
|
assert_equal_filecontent( "expected_creole/test_creole_paragraphs.normsource", creole.normsource.to_yaml)
|
198
|
-
}
|
200
|
+
#~ }
|
199
201
|
end
|
200
202
|
def test_creole_paragraphs_wrap()
|
201
203
|
creole = Docgenerator::Creole::Creole.new(:content => <<creole
|
@@ -447,6 +449,24 @@ creole
|
|
447
449
|
#~ assert_equal_filecontent( "expected_creole/test_creole_line_break.text", creole.to_doc(:text, @opt))
|
448
450
|
end
|
449
451
|
|
452
|
+
def test_creole_inline_apostroph()
|
453
|
+
creole = Docgenerator::Creole::Creole.new(:content => <<creole
|
454
|
+
You can add text "in apostoph".
|
455
|
+
|
456
|
+
Problem may be german.sty and activated " like in "a.
|
457
|
+
It will be converted to an a-Umlaut.
|
458
|
+
creole
|
459
|
+
)
|
460
|
+
assert_equal_filecontent( "expected_creole/#{__method__}.html", creole.to_doc(:html, @opt))
|
461
|
+
assert_equal_filecontent( "expected_creole/#{__method__}.latex", creole.to_doc(:latex, @opt))
|
462
|
+
$log.warn('#{__method__}: to_context')
|
463
|
+
#~ assert_equal_filecontent( "expected_creole/#{__method__}.context", creole.to_doc(:context))
|
464
|
+
$log.info('#{__method__}_bold_em: inline to wiki/creole')
|
465
|
+
#~ assert_equal_filecontent( "expected_creole/#{__method__}.creole", creole.to_doc(:creole, @opt))
|
466
|
+
$log.warn('#{__method__}_bold_em: inline text with additional spaces')
|
467
|
+
assert_equal_filecontent( "expected_creole/#{__method__}.text", creole.to_doc(:text, @opt))
|
468
|
+
end
|
469
|
+
|
450
470
|
end #Test_creole_inline
|
451
471
|
|
452
472
|
|
@@ -482,9 +502,10 @@ creole
|
|
482
502
|
#~ assert_equal_filecontent( "expected_creole/test_creole_list_ul.creole", creole.to_doc(:creole, @opt))
|
483
503
|
#~ assert_equal_filecontent( "expected_creole/test_creole_list_ul.wiki", creole.to_doc(:wiki, @opt))
|
484
504
|
#~ assert_equal_filecontent( "expected_creole/test_creole_list_ul.text", creole.to_doc(:text, @opt))
|
485
|
-
|
505
|
+
#ruby 1.8: symbols as key, ruby 1.9: Strings
|
506
|
+
#~ omit_if( RUBY_VERSION !~ /1.9/, "Wrong ruby version #{RUBY_VERSION}"){
|
486
507
|
assert_equal_filecontent( "expected_creole/test_creole_list_ul.normsource", creole.normsource.to_yaml)
|
487
|
-
}
|
508
|
+
#~ }
|
488
509
|
end
|
489
510
|
#It works fine here, but LaTeX will give you an error.
|
490
511
|
def test_creole_list_ul_too_much()
|
@@ -33,9 +33,7 @@ $tmplog = Log4r::Logger.new('Creole', Log4r::FATAL)
|
|
33
33
|
|
34
34
|
<<missingtests
|
35
35
|
erweitern:
|
36
|
-
*
|
37
|
-
*Creole_creoletab
|
38
|
-
*csv-tabs
|
36
|
+
*todonotes
|
39
37
|
|
40
38
|
placeholder mit parameter (siehe creole_rail)
|
41
39
|
|
@@ -150,123 +148,3 @@ creole
|
|
150
148
|
end #test_creole_placeholders_latex
|
151
149
|
end #Test_creole_placeholders
|
152
150
|
|
153
|
-
#http://www.wikicreole.org/wiki/Tables
|
154
|
-
class Test_creole_tabular < Test::Unit::TestCase
|
155
|
-
def test_creole_tabular_creole()
|
156
|
-
creole = Docgenerator::Creole::Creole.new(
|
157
|
-
:name => 'tabular_creole',
|
158
|
-
:content => <<'creole'
|
159
|
-
Tables are done like this:
|
160
|
-
|=header col1|=header col2|
|
161
|
-
|col1|col2|
|
162
|
-
|you |can |
|
163
|
-
|also |align\\ it. |
|
164
|
-
creole
|
165
|
-
)
|
166
|
-
$log.warn('test_creole_tabular_creole: tabular inside paragraphs/list...')
|
167
|
-
$log.warn('test_creole_tabular_creole: wiki syntax inside cell ')
|
168
|
-
assert_equal_filecontent( "expected_creole/test_creole_tabular_creole.html", creole.to_doc(:html, OPT))
|
169
|
-
assert_equal_filecontent( "expected_creole/test_creole_tabular_creole.latex", creole.to_doc(:latex, OPT))
|
170
|
-
$log.warn('test_creole_tabular_creole: to_context')
|
171
|
-
#~ assert_equal_filecontent( "expected_creole/test_creole_tabular_creole.context", creole.to_doc(:context))
|
172
|
-
$log.warn('test_creole_tabular_creole: to wiki/creole')
|
173
|
-
#~ assert_equal_filecontent( "expected_creole/test_creole_tabular_creole.creole", creole.to_doc(:creole))
|
174
|
-
$log.warn('test_creole_tabular_creole: to text/creole')
|
175
|
-
#~ assert_equal_filecontent( "expected_creole/test_creole_tabular_creole.text", creole.to_doc(:text))
|
176
|
-
end #test_creole_tabular_creole
|
177
|
-
|
178
|
-
def test_creole_tabular()
|
179
|
-
creole = Docgenerator::Creole::Creole.new(:content => <<creole
|
180
|
-
before
|
181
|
-
<<<tabular
|
182
|
-
|!columns=3
|
183
|
-
|!columndescription=ccc
|
184
|
-
|=1
|
185
|
-
|=2
|
186
|
-
|=3
|
187
|
-
|-
|
188
|
-
|eins
|
189
|
-
|zwei
|
190
|
-
|drei
|
191
|
-
|-
|
192
|
-
|one
|
193
|
-
|two
|
194
|
-
|three
|
195
|
-
>>>
|
196
|
-
after
|
197
|
-
creole
|
198
|
-
)
|
199
|
-
assert_equal_filecontent( "expected_creole/test_creole_tabular.html", creole.to_doc(:html, OPT))
|
200
|
-
assert_equal_filecontent( "expected_creole/test_creole_tabular.latex", creole.to_doc(:latex, OPT))
|
201
|
-
$log.warn('test_creole_tabular: to_context')
|
202
|
-
#~ assert_equal_filecontent( "expected_creole/test_creole_tabular.context", creole.to_doc(:context))
|
203
|
-
$log.warn('test_creole_tabular: to wiki/creole')
|
204
|
-
#~ assert_equal_filecontent( "expected_creole/test_creole_tabular.creole", creole.to_doc(:creole))
|
205
|
-
$log.warn('test_creole_tabular: to text/creole')
|
206
|
-
#~ assert_equal_filecontent( "expected_creole/test_creole_tabular.text", creole.to_doc(:text))
|
207
|
-
end #test_creole_tabular
|
208
|
-
|
209
|
-
def test_creole_tabular_with_cell_option()
|
210
|
-
# title...
|
211
|
-
creole = Docgenerator::Creole::Creole.new(:content => <<creole
|
212
|
-
before
|
213
|
-
<<<tabular
|
214
|
-
|!columns=3
|
215
|
-
|eins||css=color: red
|
216
|
-
|css = zwei
|
217
|
-
|||class=empty
|
218
|
-
|-
|
219
|
-
|normal
|
220
|
-
|//italic//
|
221
|
-
|//italic//||class=it
|
222
|
-
|-
|
223
|
-
|text with | nice! ||class = it
|
224
|
-
|||css =
|
225
|
-
|
|
226
|
-
>>>
|
227
|
-
after
|
228
|
-
creole
|
229
|
-
)
|
230
|
-
assert_equal_filecontent( "expected_creole/test_creole_tabular_with_cell_option.html", creole.to_doc(:html, OPT))
|
231
|
-
#~ assert_equal_filecontent( "expected_creole/test_creole_tabular_with_option.latex", creole.to_doc(:latex))
|
232
|
-
$log.warn('test_creole_tabular: to_context')
|
233
|
-
#~ assert_equal_filecontent( "expected_creole/test_creole_tabular.context", creole.to_doc(:context))
|
234
|
-
$log.warn('test_creole_tabular: to wiki/creole')
|
235
|
-
#~ assert_equal_filecontent( "expected_creole/test_creole_tabular.creole", creole.to_doc(:creole))
|
236
|
-
$log.warn('test_creole_tabular: to text/creole')
|
237
|
-
#~ assert_equal_filecontent( "expected_creole/test_creole_tabular.text", creole.to_doc(:text))
|
238
|
-
end #test_creole_tabular
|
239
|
-
|
240
|
-
def test_creole_tabular_css()
|
241
|
-
creole = Docgenerator::Creole::Creole.new(:content => <<creole
|
242
|
-
before
|
243
|
-
<<<tabular
|
244
|
-
|!columns=3
|
245
|
-
|!columndescription=ccc
|
246
|
-
|!css=border-width: 1px
|
247
|
-
|!css=border-style: solid
|
248
|
-
|=1
|
249
|
-
|=2
|
250
|
-
|=3
|
251
|
-
|-
|
252
|
-
|eins
|
253
|
-
|zwei
|
254
|
-
|drei
|
255
|
-
|-
|
256
|
-
|one
|
257
|
-
|two
|
258
|
-
|three
|
259
|
-
>>>
|
260
|
-
after
|
261
|
-
creole
|
262
|
-
)
|
263
|
-
assert_equal_filecontent( "expected_creole/test_creole_tabular_css.html", creole.to_doc(:html, OPT))
|
264
|
-
assert_equal_filecontent( "expected_creole/test_creole_tabular_css.latex", creole.to_doc(:latex, OPT))
|
265
|
-
$log.warn('test_creole_tabular_css: to_context')
|
266
|
-
#~ assert_equal_filecontent( "expected_creole/test_creole_tabular_css.context", creole.to_doc(:context))
|
267
|
-
$log.warn('test_creole_tabular_css: to wiki/creole')
|
268
|
-
#~ assert_equal_filecontent( "expected_creole/test_creole_tabular_css.creole", creole.to_doc(:creole))
|
269
|
-
$log.warn('test_creole_tabular_css: to text/creole')
|
270
|
-
#~ assert_equal_filecontent( "expected_creole/test_creole_tabular_css.text", creole.to_doc(:text))
|
271
|
-
end #test_creole_tabular_css
|
272
|
-
end #Test_creole_tabular
|
@@ -0,0 +1,174 @@
|
|
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_multicols()
|
152
|
+
creole = Docgenerator::Creole::Creole.new(:content => <<creole
|
153
|
+
before
|
154
|
+
<<<tabular
|
155
|
+
|!columns=3
|
156
|
+
|!columndescription=ccc
|
157
|
+
|=Titelzeile||columns=3|pos=c
|
158
|
+
|-
|
159
|
+
|eins
|
160
|
+
|zwei
|
161
|
+
|drei
|
162
|
+
>>>
|
163
|
+
after
|
164
|
+
creole
|
165
|
+
)
|
166
|
+
assert_equal_filecontent( "expected_creole/test_creole_tabular_multicols.html", creole.to_doc(:html, OPT))
|
167
|
+
assert_equal_filecontent( "expected_creole/test_creole_tabular_multicols.latex", creole.to_doc(:latex, OPT))
|
168
|
+
$log.warn('test_creole_tabular_multicols: to_context')
|
169
|
+
#~ assert_equal_filecontent( "expected_creole/test_creole_tabular_multicols.context", creole.to_doc(:context))
|
170
|
+
assert_equal_filecontent( "expected_creole/test_creole_tabular_multicols.creole", creole.to_doc(:creole))
|
171
|
+
$log.warn('test_creole_tabular_multicols: to text')
|
172
|
+
#~ assert_equal_filecontent( "expected_creole/test_creole_tabular_multicols.text", creole.to_doc(:text))
|
173
|
+
end #test_creole_tabular_multicols
|
174
|
+
end #Test_creole_tabular
|
@@ -11,6 +11,8 @@ require 'docgenerator'
|
|
11
11
|
include Docgenerator
|
12
12
|
#~ DOCGENERATOR_LOGGER.level = Log4r::DEBUG
|
13
13
|
|
14
|
+
#~ DOCGENERATOR_DEFAULT_LOGGER.level = Log4r::ERROR
|
15
|
+
|
14
16
|
#~ Element::SUPPORTED_TARGETS << :context
|
15
17
|
#~ Element::SUPPORTED_TARGETS << :creole
|
16
18
|
|
@@ -256,7 +258,6 @@ class Test_tabular < Test::Unit::TestCase
|
|
256
258
|
@opt = { :log => DOCGENERATOR_DEFAULT_LOGGER } #unless defined? @opt
|
257
259
|
end
|
258
260
|
def mk_tabular( columns, lines )
|
259
|
-
|
260
261
|
tab = element(:tabular, {
|
261
262
|
:columns => columns.size, #for HTML
|
262
263
|
:columndescription => 'c' * columns.size #for LaTeX
|
@@ -297,8 +298,8 @@ class Test_tabular < Test::Unit::TestCase
|
|
297
298
|
assert_equal_filecontent( "expected/test_tabular.latex", text.to_doc(:latex, @opt))
|
298
299
|
$log.warn('test_tabular: to_context')
|
299
300
|
#~ assert_equal_filecontent( "expected/test_tabular.context", text.to_doc(:context, @opt))
|
300
|
-
|
301
|
-
|
301
|
+
|
302
|
+
assert_equal_filecontent( "expected/test_tabular.creole", text.to_doc(:creole, @opt))
|
302
303
|
assert_equal_filecontent( "expected/test_tabular.wiki", text.to_doc(:wiki,@opt))
|
303
304
|
$log.warn("text-output for tables")
|
304
305
|
#~ assert_equal_filecontent( "expected/test_tabular.text", text.to_doc(:text, @opt))
|