Skip to content

Commit c0b1490

Browse files
committed
Fix test_sectioning for Docutils 0.22+
1 parent c1505c1 commit c0b1490

File tree

1 file changed

+109
-52
lines changed

1 file changed

+109
-52
lines changed

tests/roots/test-directive-only/only.rst

Lines changed: 109 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,32 @@
44

55
Testing sections in only directives.
66

7-
1.1. Section
8-
------------
9-
Should be here.
7+
.. only:: nonexisting_tag
8+
9+
Skipped Section
10+
---------------
11+
Should not be here.
12+
13+
.. only:: not nonexisting_tag
14+
15+
1.1. Section
16+
------------
17+
Should be here.
1018

1119
1.2. Section
1220
------------
1321

14-
1.2.1. Subsection
15-
~~~~~~~~~~~~~~~~~
16-
Should be here.
22+
.. only:: not nonexisting_tag
23+
24+
1.2.1. Subsection
25+
~~~~~~~~~~~~~~~~~
26+
Should be here.
27+
28+
.. only:: nonexisting_tag
29+
30+
Skipped Subsection
31+
~~~~~~~~~~~~~~~~~~
32+
Should not be here.
1733

1834
1.3. Section
1935
------------
@@ -25,16 +41,20 @@ Should be here.
2541
1.4. Section
2642
------------
2743

28-
1.4.1. Subsection
29-
~~~~~~~~~~~~~~~~~
30-
Should be here.
44+
.. only:: not nonexisting_tag
45+
46+
1.4.1. Subsection
47+
~~~~~~~~~~~~~~~~~
48+
Should be here.
3149

3250
1.5. Section
3351
------------
3452

35-
1.5.1. Subsection
36-
~~~~~~~~~~~~~~~~~
37-
Should be here.
53+
.. only:: not nonexisting_tag
54+
55+
1.5.1. Subsection
56+
~~~~~~~~~~~~~~~~~
57+
Should be here.
3858

3959
1.5.2. Subsection
4060
~~~~~~~~~~~~~~~~~
@@ -47,9 +67,11 @@ Should be here.
4767
~~~~~~~~~~~~~~~~~
4868
Should be here.
4969

50-
1.6.2. Subsection
51-
~~~~~~~~~~~~~~~~~
52-
Should be here.
70+
.. only:: not nonexisting_tag
71+
72+
1.6.2. Subsection
73+
~~~~~~~~~~~~~~~~~
74+
Should be here.
5375

5476
1.6.3. Subsection
5577
~~~~~~~~~~~~~~~~~
@@ -62,9 +84,11 @@ Should be here.
6284
~~~~~~~~~~~~~~~~~
6385
Should be here.
6486

65-
1.7.1.1. Subsubsection
66-
......................
67-
Should be here.
87+
.. only:: not nonexisting_tag
88+
89+
1.7.1.1. Subsubsection
90+
......................
91+
Should be here.
6892

6993
1.8. Section
7094
------------
@@ -77,13 +101,20 @@ Should be here.
77101
......................
78102
Should be here.
79103

80-
1.8.1.2. Subsubsection
81-
......................
82-
Should be here.
104+
.. only:: not nonexisting_tag
105+
106+
1.8.1.2. Subsubsection
107+
......................
108+
Should be here.
83109

84110
1.9. Section
85111
------------
86112

113+
.. only:: nonexisting_tag
114+
115+
Skipped Subsection
116+
~~~~~~~~~~~~~~~~~~
117+
87118
1.9.1. Subsection
88119
~~~~~~~~~~~~~~~~~
89120
Should be here.
@@ -92,55 +123,81 @@ Should be here.
92123
......................
93124
Should be here.
94125

95-
1.10. Section
96-
-------------
97-
Should be here.
126+
.. only:: not nonexisting_tag
127+
128+
1.10. Section
129+
-------------
130+
Should be here.
98131

99132
1.11. Section
100133
-------------
101134

102135
Text before subsection 11.1.
103136

104-
More text before subsection 11.1.
137+
.. only:: not nonexisting_tag
105138

106-
1.11.1. Subsection
107-
~~~~~~~~~~~~~~~~~~
108-
Should be here.
139+
More text before subsection 11.1.
140+
141+
1.11.1. Subsection
142+
~~~~~~~~~~~~~~~~~~
143+
Should be here.
109144

110145
Text after subsection 11.1.
111146

112-
1.12. Section
113-
-------------
114-
Should be here.
147+
.. only:: not nonexisting_tag
115148

116-
1.12.1. Subsection
117-
~~~~~~~~~~~~~~~~~~
118-
Should be here.
149+
1.12. Section
150+
-------------
151+
Should be here.
119152

120-
1.13. Section
121-
-------------
122-
Should be here.
153+
1.12.1. Subsection
154+
~~~~~~~~~~~~~~~~~~
155+
Should be here.
123156

124-
1.14. Section
125-
-------------
126-
Should be here.
157+
1.13. Section
158+
-------------
159+
Should be here.
127160

128-
1.14.1. Subsection
129-
~~~~~~~~~~~~~~~~~~
130-
Should be here.
161+
.. only:: not nonexisting_tag
131162

132-
1.15. Section
133-
-------------
134-
Should be here.
163+
1.14. Section
164+
-------------
165+
Should be here.
135166

136-
2. Included document level heading
137-
==================================
138-
Should be here.
167+
.. only:: not nonexisting_tag
168+
169+
1.14.1. Subsection
170+
~~~~~~~~~~~~~~~~~~
171+
Should be here.
172+
173+
1.15. Section
174+
-------------
175+
Should be here.
176+
177+
.. only:: nonexisting_tag
178+
179+
Skipped document level heading
180+
==============================
181+
Should not be here.
182+
183+
.. only:: not nonexisting_tag
184+
185+
2. Included document level heading
186+
==================================
187+
Should be here.
139188

140189
3. Document level heading
141190
=========================
142191
Should be here.
143192

144-
4. Another included document level heading
145-
==========================================
146-
Should be here.
193+
.. only:: nonexisting_tag
194+
195+
Skipped document level heading
196+
==============================
197+
Should not be here.
198+
199+
.. only:: not nonexisting_tag
200+
201+
4. Another included document level heading
202+
==========================================
203+
Should be here.

0 commit comments

Comments
 (0)