File tree Expand file tree Collapse file tree 2 files changed +11
-23
lines changed Expand file tree Collapse file tree 2 files changed +11
-23
lines changed Original file line number Diff line number Diff line change @@ -89,18 +89,6 @@ fn chapter_content_appears_in_rendered_document() {
89
89
}
90
90
}
91
91
92
- /// Apply a series of predicates to some root predicate, where each
93
- /// successive predicate is the descendant of the last one. Similar to how you
94
- /// might do `ul.foo li a` in CSS to access all anchor tags in the `foo` list.
95
- macro_rules! descendants {
96
- ( $root: expr, $( $child: expr) ,* ) => {
97
- $root
98
- $(
99
- . descendant( $child)
100
- ) *
101
- } ;
102
- }
103
-
104
92
/// Make sure that all `*.md` files (excluding `SUMMARY.md`) were rendered
105
93
/// and placed in the `book` directory with their extensions set to `*.html`.
106
94
#[ test]
@@ -169,17 +157,6 @@ fn toc_fallback_html() -> Result<Document> {
169
157
Ok ( Document :: from ( html. as_str ( ) ) )
170
158
}
171
159
172
- #[ test]
173
- fn check_spacers ( ) {
174
- let doc = toc_js_html ( ) . unwrap ( ) ;
175
- let should_be = 2 ;
176
-
177
- let num_spacers = doc
178
- . find ( Class ( "chapter" ) . descendant ( Name ( "li" ) . and ( Class ( "spacer" ) ) ) )
179
- . count ( ) ;
180
- assert_eq ! ( num_spacers, should_be) ;
181
- }
182
-
183
160
// don't use target="_parent" in JS
184
161
#[ test]
185
162
fn check_link_target_js ( ) {
Original file line number Diff line number Diff line change @@ -84,3 +84,14 @@ fn check_first_toc_level() {
84
84
85
85
assert_eq ! ( children, should_be) ;
86
86
}
87
+
88
+ #[ test]
89
+ fn check_spacers ( ) {
90
+ let doc = toc_js_html ( ) ;
91
+ let should_be = 2 ;
92
+
93
+ let num_spacers = doc
94
+ . find ( Class ( "chapter" ) . descendant ( Name ( "li" ) . and ( Class ( "spacer" ) ) ) )
95
+ . count ( ) ;
96
+ assert_eq ! ( num_spacers, should_be) ;
97
+ }
You can’t perform that action at this time.
0 commit comments