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() {
8989 }
9090}
9191
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-
10492/// Make sure that all `*.md` files (excluding `SUMMARY.md`) were rendered
10593/// and placed in the `book` directory with their extensions set to `*.html`.
10694#[ test]
@@ -169,17 +157,6 @@ fn toc_fallback_html() -> Result<Document> {
169157 Ok ( Document :: from ( html. as_str ( ) ) )
170158}
171159
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-
183160// don't use target="_parent" in JS
184161#[ test]
185162fn check_link_target_js ( ) {
Original file line number Diff line number Diff line change @@ -84,3 +84,14 @@ fn check_first_toc_level() {
8484
8585 assert_eq ! ( children, should_be) ;
8686}
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