asciidoctor-doctest 2.0.0.beta.2 → 2.0.0.beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/README.adoc +37 -37
  3. data/data/examples/asciidoc/{block_admonition.adoc → admonition.adoc} +15 -15
  4. data/data/examples/asciidoc/{block_audio.adoc → audio.adoc} +3 -3
  5. data/data/examples/asciidoc/{block_colist.adoc → colist.adoc} +2 -2
  6. data/data/examples/asciidoc/{block_dlist.adoc → dlist.adoc} +11 -11
  7. data/data/examples/asciidoc/document.adoc +9 -9
  8. data/data/examples/asciidoc/{block_example.adoc → example.adoc} +2 -2
  9. data/data/examples/asciidoc/{block_floating_title.adoc → floating_title.adoc} +2 -2
  10. data/data/examples/asciidoc/{block_image.adoc → image.adoc} +8 -8
  11. data/data/examples/asciidoc/inline_anchor.adoc +9 -9
  12. data/data/examples/asciidoc/inline_break.adoc +1 -1
  13. data/data/examples/asciidoc/inline_footnote.adoc +1 -1
  14. data/data/examples/asciidoc/inline_image.adoc +11 -11
  15. data/data/examples/asciidoc/inline_quoted.adoc +9 -9
  16. data/data/examples/asciidoc/{block_listing.adoc → listing.adoc} +6 -6
  17. data/data/examples/asciidoc/{block_literal.adoc → literal.adoc} +2 -2
  18. data/data/examples/asciidoc/{block_olist.adoc → olist.adoc} +7 -7
  19. data/data/examples/asciidoc/{block_open.adoc → open.adoc} +4 -4
  20. data/data/examples/asciidoc/{block_outline.adoc → outline.adoc} +0 -0
  21. data/data/examples/asciidoc/{block_page_break.adoc → page_break.adoc} +0 -0
  22. data/data/examples/asciidoc/{block_paragraph.adoc → paragraph.adoc} +2 -2
  23. data/data/examples/asciidoc/{block_pass.adoc → pass.adoc} +0 -0
  24. data/data/examples/asciidoc/{block_preamble.adoc → preamble.adoc} +1 -1
  25. data/data/examples/asciidoc/{block_quote.adoc → quote.adoc} +4 -4
  26. data/data/examples/asciidoc/section.adoc +5 -5
  27. data/data/examples/asciidoc/{block_sidebar.adoc → sidebar.adoc} +2 -2
  28. data/data/examples/asciidoc/{block_stem.adoc → stem.adoc} +2 -2
  29. data/data/examples/asciidoc/{block_table.adoc → table.adoc} +17 -17
  30. data/data/examples/asciidoc/{block_thematic_break.adoc → thematic_break.adoc} +0 -0
  31. data/data/examples/asciidoc/{block_toc.adoc → toc.adoc} +6 -6
  32. data/data/examples/asciidoc/{block_ulist.adoc → ulist.adoc} +4 -4
  33. data/data/examples/asciidoc/{block_verse.adoc → verse.adoc} +4 -4
  34. data/data/examples/asciidoc/{block_video.adoc → video.adoc} +7 -7
  35. data/features/fixtures/html-slim/examples/asciidoc/document.adoc +1 -1
  36. data/features/fixtures/html-slim/examples/asciidoc/{block_quote.adoc → quote.adoc} +3 -3
  37. data/features/fixtures/html-slim/examples/html/document.html +1 -1
  38. data/features/fixtures/html-slim/examples/html/{block_quote.html → quote.html} +2 -2
  39. data/features/fixtures/html-slim/templates/{block_paragraph.html.slim → paragraph.html.slim} +0 -0
  40. data/features/fixtures/html-slim/templates/{block_quote.html.slim → quote.html.slim} +0 -0
  41. data/features/generator_html.feature +24 -24
  42. data/features/test_html.feature +13 -13
  43. data/lib/asciidoctor/doctest/example.rb +1 -1
  44. data/lib/asciidoctor/doctest/rake_tasks.rb +2 -2
  45. data/lib/asciidoctor/doctest/version.rb +1 -1
  46. metadata +35 -35
@@ -5,7 +5,7 @@ It was designed from the start to be a shorthand syntax
5
5
  for producing professional documents like DocBook and LaTeX.
6
6
  ****
7
7
 
8
- // .with_title
8
+ // .with-title
9
9
  .AsciiDoc history
10
10
  ****
11
11
  AsciiDoc was first released in Nov 2002 by Stuart Rackham.
@@ -13,7 +13,7 @@ It was designed from the start to be a shorthand syntax
13
13
  for producing professional documents like DocBook and LaTeX.
14
14
  ****
15
15
 
16
- // .with_id_and_role
16
+ // .with-id-and-role
17
17
  [#origin.center]
18
18
  ****
19
19
  AsciiDoc was first released in Nov 2002 by Stuart Rackham.
@@ -12,7 +12,7 @@ sqrt(4) = 2
12
12
  C = \alpha + \beta Y^{\gamma} + \epsilon
13
13
  ++++
14
14
 
15
- // .with_title
15
+ // .with-title
16
16
  :stem:
17
17
  [stem]
18
18
  .Equation
@@ -20,7 +20,7 @@ C = \alpha + \beta Y^{\gamma} + \epsilon
20
20
  sqrt(4) = 2
21
21
  ++++
22
22
 
23
- // .with_id_and_role
23
+ // .with-id-and-role
24
24
  :stem:
25
25
  [stem, id="sqrt", role="right"]
26
26
  ++++
@@ -4,55 +4,55 @@
4
4
  | Cell in column 1, row 2 | Cell in column 2, row 2
5
5
  |===
6
6
 
7
- // .with_frame_sides
7
+ // .with-frame-sides
8
8
  [frame=sides]
9
9
  |===
10
10
  | Cell in column 1, row 1 | Cell in column 2, row 1
11
11
  |===
12
12
 
13
- // .with_grid_cols
13
+ // .with-grid-cols
14
14
  [grid=cols]
15
15
  |===
16
16
  | Cell in column 1, row 1 | Cell in column 2, row 1
17
17
  |===
18
18
 
19
- // .with_float
19
+ // .with-float
20
20
  [float=left]
21
21
  |===
22
22
  | Cell in column 1, row 1 | Cell in column 2, row 1
23
23
  |===
24
24
 
25
- // .with_width
25
+ // .with-width
26
26
  [width=80]
27
27
  |===
28
28
  | Cell in column 1, row 1 | Cell in column 2, row 1
29
29
  |===
30
30
 
31
- // .with_autowidth
31
+ // .with-autowidth
32
32
  [options="autowidth"]
33
33
  |===
34
34
  | Cell in column 1, row 1 | Cell in column 2, row 1
35
35
  |===
36
36
 
37
- // .with_autowidth_and_width
37
+ // .with-autowidth-and-width
38
38
  [options="autowidth", width=80]
39
39
  |===
40
40
  | Cell in column 1, row 1 | Cell in column 2, row 1
41
41
  |===
42
42
 
43
- // .with_title
43
+ // .with-title
44
44
  .Table FTW!
45
45
  |===
46
46
  | Cell in column 1, row 1 | Cell in column 2, row 1
47
47
  |===
48
48
 
49
- // .with_id_and_role
49
+ // .with-id-and-role
50
50
  [#tabular.center]
51
51
  |===
52
52
  | Cell in column 1, row 1 | Cell in column 2, row 1
53
53
  |===
54
54
 
55
- // .with_header
55
+ // .with-header
56
56
  [options="header"]
57
57
  |===
58
58
  | Name of Column 1 | Name of Column 2
@@ -61,7 +61,7 @@
61
61
  | Cell in column 1, row 2 | Cell in column 2, row 2
62
62
  |===
63
63
 
64
- // .with_footer
64
+ // .with-footer
65
65
  [options="footer"]
66
66
  |===
67
67
  | Cell in column 1, row 1 | Cell in column 2, row 1
@@ -69,7 +69,7 @@
69
69
  | Footer in column 1, row 3 | Footer in column 2, row 3
70
70
  |===
71
71
 
72
- // .with_cols_width
72
+ // .with-cols-width
73
73
  [cols="50,20,30"]
74
74
  |===
75
75
  |Cell in column 1, row 1
@@ -77,7 +77,7 @@
77
77
  |Cell in column 3, row 1
78
78
  |===
79
79
 
80
- // .with_cols_halign
80
+ // .with-cols-halign
81
81
  [cols="<,^,>"]
82
82
  |===
83
83
  |Cell in column 1, row 1
@@ -85,7 +85,7 @@
85
85
  |Cell in column 3, row 1
86
86
  |===
87
87
 
88
- // .with_cols_valign
88
+ // .with-cols-valign
89
89
  [cols=".<,.^,.>"]
90
90
  |===
91
91
  |Cell in column 1, row 1
@@ -93,7 +93,7 @@
93
93
  |Cell in column 3, row 1
94
94
  |===
95
95
 
96
- // .with_cols_styles
96
+ // .with-cols-styles
97
97
  [cols="a,e,h,l,m,s,v"]
98
98
  |===
99
99
  |image::sunset.jpg[AsciiDoc content]
@@ -126,7 +126,7 @@
126
126
  | Cell in column 2, row 3 | Cell in column 3, row 3
127
127
  |===
128
128
 
129
- // .cell_with_paragraphs
129
+ // .cell-with-paragraphs
130
130
  |===
131
131
 
132
132
  |Single paragraph on row 1
@@ -136,7 +136,7 @@
136
136
  Second paragraph on row 2
137
137
  |===
138
138
 
139
- // .aligns_per_cell
139
+ // .aligns-per-cell
140
140
  [cols="3"]
141
141
  |===
142
142
  ^|Prefix the +{vbar}+ with +{caret}+ to center content horizontally
@@ -151,7 +151,7 @@ Second paragraph on row 2
151
151
 
152
152
  |===
153
153
 
154
- // .insane_cells_formatting
154
+ // .insane-cells-formatting
155
155
  // seriously, this isn't readable anymore ;)
156
156
  |===
157
157
 
@@ -1,7 +1,7 @@
1
1
  // .basic
2
- // The block_toc node is used only with toc::[] macro!
3
- // Actual TOC content is rendered in block_outline, this template usually
4
- // renders just a "border".
2
+ // The toc node is used only with toc::[] macro!
3
+ // Actual TOC content is rendered in the outline template, this template
4
+ // usually renders just a "border".
5
5
  = Document Title
6
6
  :toc:
7
7
  :toc-placement!:
@@ -14,7 +14,7 @@ toc::[]
14
14
 
15
15
  === A Recipe for Potion
16
16
 
17
- // .with_title
17
+ // .with-title
18
18
  = Document Title
19
19
  :toc:
20
20
  :toc-placement!:
@@ -25,7 +25,7 @@ toc::[title="Table of Adventures"]
25
25
 
26
26
  == The Ravages of Writing
27
27
 
28
- // .with_levels
28
+ // .with-levels
29
29
  = Document Title
30
30
  :toc:
31
31
  :toc-placement!:
@@ -38,7 +38,7 @@ toc::[levels=1]
38
38
 
39
39
  === A Recipe for Potion
40
40
 
41
- // .with_id_and_role
41
+ // .with-id-and-role
42
42
  = Document Title
43
43
  :toc:
44
44
  :toc-placement!:
@@ -3,19 +3,19 @@
3
3
  * Sheri S. Tepper
4
4
  * Bill Bryson
5
5
 
6
- // .with_title
6
+ // .with-title
7
7
  .Writers
8
8
  * Edgar Allen Poe
9
9
  * Sheri S. Tepper
10
10
  * Bill Bryson
11
11
 
12
- // .with_id_and_role
12
+ // .with-id-and-role
13
13
  [#authors.green]
14
14
  * Edgar Allen Poe
15
15
  * Sheri S. Tepper
16
16
  * Bill Bryson
17
17
 
18
- // .max_nesting
18
+ // .max-nesting
19
19
  * level 1
20
20
  ** level 2
21
21
  *** level 3
@@ -23,7 +23,7 @@
23
23
  ***** level 5
24
24
  ** level 2
25
25
 
26
- // .complex_content
26
+ // .complex-content
27
27
  * Every list item has at least one paragraph of content,
28
28
  which may be wrapped, even using a hanging indent.
29
29
  +
@@ -3,23 +3,23 @@
3
3
  The fog comes
4
4
  on little cat feet.
5
5
 
6
- // .basic_with_attribution
6
+ // .basic-with-attribution
7
7
  [verse, Carl Sandburg]
8
8
  The fog comes
9
9
  on little cat feet.
10
10
 
11
- // .basic_with_attribution_and_citetitle
11
+ // .basic-with-attribution-and-citetitle
12
12
  [verse, Carl Sandburg, two lines from the poem Fog]
13
13
  The fog comes
14
14
  on little cat feet.
15
15
 
16
- // .basic_with_title
16
+ // .basic-with-title
17
17
  [verse]
18
18
  .Poetry
19
19
  The fog comes
20
20
  on little cat feet.
21
21
 
22
- // .basic_with_id_and_role
22
+ // .basic-with-id-and-role
23
23
  [verse, id="sandburg", role="center"]
24
24
  The fog comes
25
25
  on little cat feet.
@@ -1,24 +1,24 @@
1
1
  // .basic
2
2
  video::video_file.mp4[]
3
3
 
4
- // .with_poster
4
+ // .with-poster
5
5
  video::video_file.mp4[poster="sunset.jpg"]
6
6
 
7
- // .with_dimensions
7
+ // .with-dimensions
8
8
  video::video_file.mp4[width=640, height=480]
9
9
 
10
- // .with_start
10
+ // .with-start
11
11
  video::video_file.mp4[start=10]
12
12
 
13
- // .with_end
13
+ // .with-end
14
14
  video::video_file.mp4[end=60]
15
15
 
16
- // .with_options
16
+ // .with-options
17
17
  video::video_file.mp4[options="autoplay, loop, nocontrols"]
18
18
 
19
- // .with_title
19
+ // .with-title
20
20
  .Must watch!
21
21
  video::video_file.mp4[]
22
22
 
23
- // .with_id_and_role
23
+ // .with-id-and-role
24
24
  video::video_file.mp4[id="lindsey", role="watch"]
@@ -1,4 +1,4 @@
1
- // .title_with_author
1
+ // .title-with-author
2
2
  // This example should fail.
3
3
  = The Dangerous and Thrilling Documentation Chronicles
4
4
  Kismet Rainbow Chameleon <kismet@asciidoctor.org>
@@ -1,12 +1,12 @@
1
- // .with_id_and_role
1
+ // .with-id-and-role
2
2
  [quote, id="parking", role="startrek"]
3
3
  Everybody remember where we parked.
4
4
 
5
- // .with_title
5
+ // .with-title
6
6
  .After landing the cloaked Klingon bird of prey in Golden Gate park:
7
7
  [quote]
8
8
  Everybody remember where we parked.
9
9
 
10
- // .with_attribution
10
+ // .with-attribution
11
11
  [quote, Albert Einstein]
12
12
  A person who never made a mistake _never_ tried anything new.
@@ -1,4 +1,4 @@
1
- <!-- .title_with_author
1
+ <!-- .title-with-author
2
2
  :include: .//body/div[@id="header"]
3
3
  -->
4
4
  <div id="header">
@@ -6,7 +6,7 @@ Doesn't exist in input examples.
6
6
  on this continent a new nation&#8230;&#8203;</blockquote>
7
7
  </div>
8
8
 
9
- <!-- .with_id_and_role
9
+ <!-- .with-id-and-role
10
10
  Correct example.
11
11
  -->
12
12
  <div id="parking"
@@ -17,7 +17,7 @@ Correct example.
17
17
  </blockquote>
18
18
  </div>
19
19
 
20
- <!-- .with_attribution
20
+ <!-- .with-attribution
21
21
  Failing example.
22
22
  -->
23
23
  <div class="quoteblock">
@@ -8,15 +8,15 @@ Feature: Generating output examples for a custom HTML backend
8
8
  Then the output should contain:
9
9
  """
10
10
  Generating test examples *:* in examples/html
11
- --> Unchanged block_quote:with_id_and_role
12
- --> Generating block_quote:with_title
13
- --> Skipping block_quote:with_attribution
14
- --> Unknown block_quote:basic, doesn't exist in input examples!
15
- --> Skipping document:title_with_author
11
+ --> Skipping document:title-with-author
16
12
  --> Generating inline_quoted:emphasis
13
+ --> Unchanged quote:with-id-and-role
14
+ --> Generating quote:with-title
15
+ --> Skipping quote:with-attribution
16
+ --> Unknown quote:basic, doesn't exist in input examples!
17
17
 
18
18
  """
19
- And the file "examples/html/block_quote.html" should contain exactly:
19
+ And the file "examples/html/quote.html" should contain exactly:
20
20
  """
21
21
  <!-- .basic
22
22
  Doesn't exist in input examples.
@@ -26,7 +26,7 @@ Feature: Generating output examples for a custom HTML backend
26
26
  on this continent a new nation&#8230;&#8203;</blockquote>
27
27
  </div>
28
28
 
29
- <!-- .with_id_and_role
29
+ <!-- .with-id-and-role
30
30
  Correct example.
31
31
  -->
32
32
  <div id="parking"
@@ -37,7 +37,7 @@ Feature: Generating output examples for a custom HTML backend
37
37
  </blockquote>
38
38
  </div>
39
39
 
40
- <!-- .with_attribution
40
+ <!-- .with-attribution
41
41
  Failing example.
42
42
  -->
43
43
  <div class="quoteblock">
@@ -45,7 +45,7 @@ Feature: Generating output examples for a custom HTML backend
45
45
  <div>Albert Einstein</div>
46
46
  </div>
47
47
 
48
- <!-- .with_title -->
48
+ <!-- .with-title -->
49
49
  <section class="quoteblock">
50
50
  <h6>After landing the cloaked Klingon bird of prey in Golden Gate park:</h6>
51
51
  <blockquote>Everybody remember where we parked.</blockquote>
@@ -54,7 +54,7 @@ Feature: Generating output examples for a custom HTML backend
54
54
  """
55
55
  And the file "examples/html/document.html" should contain exactly:
56
56
  """
57
- <!-- .title_with_author
57
+ <!-- .title-with-author
58
58
  :include: .//body/div[@id="header"]
59
59
  -->
60
60
  <div id="header">
@@ -75,15 +75,15 @@ Feature: Generating output examples for a custom HTML backend
75
75
  Then the output should contain:
76
76
  """
77
77
  Generating test examples *:* in examples/html
78
- --> Unchanged block_quote:with_id_and_role
79
- --> Generating block_quote:with_title
80
- --> Rewriting block_quote:with_attribution
81
- --> Unknown block_quote:basic, doesn't exist in input examples!
82
- --> Rewriting document:title_with_author
78
+ --> Rewriting document:title-with-author
83
79
  --> Generating inline_quoted:emphasis
80
+ --> Unchanged quote:with-id-and-role
81
+ --> Generating quote:with-title
82
+ --> Rewriting quote:with-attribution
83
+ --> Unknown quote:basic, doesn't exist in input examples!
84
84
 
85
85
  """
86
- And the file "examples/html/block_quote.html" should contain exactly:
86
+ And the file "examples/html/quote.html" should contain exactly:
87
87
  """
88
88
  <!-- .basic
89
89
  Doesn't exist in input examples.
@@ -93,7 +93,7 @@ Feature: Generating output examples for a custom HTML backend
93
93
  on this continent a new nation&#8230;&#8203;</blockquote>
94
94
  </div>
95
95
 
96
- <!-- .with_id_and_role
96
+ <!-- .with-id-and-role
97
97
  Correct example.
98
98
  -->
99
99
  <div id="parking"
@@ -104,7 +104,7 @@ Feature: Generating output examples for a custom HTML backend
104
104
  </blockquote>
105
105
  </div>
106
106
 
107
- <!-- .with_attribution
107
+ <!-- .with-attribution
108
108
  Failing example.
109
109
  -->
110
110
  <div class="quoteblock">
@@ -112,7 +112,7 @@ Feature: Generating output examples for a custom HTML backend
112
112
  <div class="attribution">— Albert Einstein</div>
113
113
  </div>
114
114
 
115
- <!-- .with_title -->
115
+ <!-- .with-title -->
116
116
  <section class="quoteblock">
117
117
  <h6>After landing the cloaked Klingon bird of prey in Golden Gate park:</h6>
118
118
  <blockquote>Everybody remember where we parked.</blockquote>
@@ -121,7 +121,7 @@ Feature: Generating output examples for a custom HTML backend
121
121
  """
122
122
  And the file "examples/html/document.html" should contain exactly:
123
123
  """
124
- <!-- .title_with_author
124
+ <!-- .title-with-author
125
125
  :include: .//body/div[@id="header"]
126
126
  -->
127
127
  <div id="header">
@@ -136,10 +136,10 @@ Feature: Generating output examples for a custom HTML backend
136
136
  Then the output should contain:
137
137
  """
138
138
  Generating test examples *:*attribution in examples/html
139
- --> Rewriting block_quote:with_attribution
139
+ --> Rewriting quote:with-attribution
140
140
 
141
141
  """
142
- And the file "examples/html/block_quote.html" should contain exactly:
142
+ And the file "examples/html/quote.html" should contain exactly:
143
143
  """
144
144
  <!-- .basic
145
145
  Doesn't exist in input examples.
@@ -149,7 +149,7 @@ Feature: Generating output examples for a custom HTML backend
149
149
  on this continent a new nation&#8230;&#8203;</blockquote>
150
150
  </div>
151
151
 
152
- <!-- .with_id_and_role
152
+ <!-- .with-id-and-role
153
153
  Correct example.
154
154
  -->
155
155
  <div id="parking"
@@ -160,7 +160,7 @@ Feature: Generating output examples for a custom HTML backend
160
160
  </blockquote>
161
161
  </div>
162
162
 
163
- <!-- .with_attribution
163
+ <!-- .with-attribution
164
164
  Failing example.
165
165
  -->
166
166
  <div class="quoteblock">