@@ -48,24 +48,24 @@ This is a modified index.hbs!
4848#[ test]
4949fn default_fonts ( ) {
5050 BookTest :: init ( |_| { } )
51- . check_file_contains ( "book/index.html" , "fonts/fonts.css" )
51+ . check_file_contains ( "book/index.html" , "fonts/fonts-[..] .css" )
5252 . check_file_list (
5353 "book/fonts" ,
5454 str![ [ r#"
5555book/fonts/OPEN-SANS-LICENSE.txt
5656book/fonts/SOURCE-CODE-PRO-LICENSE.txt
57- book/fonts/fonts.css
58- book/fonts/open-sans-v17-all-charsets-300.woff2
59- book/fonts/open-sans-v17-all-charsets-300italic.woff2
60- book/fonts/open-sans-v17-all-charsets-600.woff2
61- book/fonts/open-sans-v17-all-charsets-600italic.woff2
62- book/fonts/open-sans-v17-all-charsets-700.woff2
63- book/fonts/open-sans-v17-all-charsets-700italic.woff2
64- book/fonts/open-sans-v17-all-charsets-800.woff2
65- book/fonts/open-sans-v17-all-charsets-800italic.woff2
66- book/fonts/open-sans-v17-all-charsets-italic.woff2
67- book/fonts/open-sans-v17-all-charsets-regular.woff2
68- book/fonts/source-code-pro-v11-all-charsets-500.woff2
57+ book/fonts/fonts-[..] .css
58+ book/fonts/open-sans-v17-all-charsets-300-[..] .woff2
59+ book/fonts/open-sans-v17-all-charsets-300italic-[..] .woff2
60+ book/fonts/open-sans-v17-all-charsets-600-[..] .woff2
61+ book/fonts/open-sans-v17-all-charsets-600italic-[..] .woff2
62+ book/fonts/open-sans-v17-all-charsets-700-[..] .woff2
63+ book/fonts/open-sans-v17-all-charsets-700italic-[..] .woff2
64+ book/fonts/open-sans-v17-all-charsets-800-[..] .woff2
65+ book/fonts/open-sans-v17-all-charsets-800italic-[..] .woff2
66+ book/fonts/open-sans-v17-all-charsets-italic-[..] .woff2
67+ book/fonts/open-sans-v17-all-charsets-regular-[..] .woff2
68+ book/fonts/source-code-pro-v11-all-charsets-500-[..] .woff2
6969"# ] ] ,
7070 ) ;
7171}
@@ -76,7 +76,7 @@ fn theme_fonts_copied() {
7676 BookTest :: init ( |bb| {
7777 bb. copy_theme ( true ) ;
7878 } )
79- . check_file_contains ( "book/index.html" , "fonts/fonts.css" )
79+ . check_file_contains ( "book/index.html" , "fonts/fonts-[..] .css" )
8080 . check_file_list (
8181 "theme/fonts" ,
8282 str![ [ r#"
@@ -96,23 +96,25 @@ theme/fonts/open-sans-v17-all-charsets-regular.woff2
9696theme/fonts/source-code-pro-v11-all-charsets-500.woff2
9797"# ] ] ,
9898 )
99+ // Note that license files get hashed, which is not like the behavior when
100+ // the theme directory is empty. It kinda makes sense, but is weird.
99101 . check_file_list (
100102 "book/fonts" ,
101103 str![ [ r#"
102- book/fonts/OPEN-SANS-LICENSE.txt
103- book/fonts/SOURCE-CODE-PRO-LICENSE.txt
104- book/fonts/fonts.css
105- book/fonts/open-sans-v17-all-charsets-300.woff2
106- book/fonts/open-sans-v17-all-charsets-300italic.woff2
107- book/fonts/open-sans-v17-all-charsets-600.woff2
108- book/fonts/open-sans-v17-all-charsets-600italic.woff2
109- book/fonts/open-sans-v17-all-charsets-700.woff2
110- book/fonts/open-sans-v17-all-charsets-700italic.woff2
111- book/fonts/open-sans-v17-all-charsets-800.woff2
112- book/fonts/open-sans-v17-all-charsets-800italic.woff2
113- book/fonts/open-sans-v17-all-charsets-italic.woff2
114- book/fonts/open-sans-v17-all-charsets-regular.woff2
115- book/fonts/source-code-pro-v11-all-charsets-500.woff2
104+ book/fonts/OPEN-SANS-LICENSE-[..] .txt
105+ book/fonts/SOURCE-CODE-PRO-LICENSE-[..] .txt
106+ book/fonts/fonts-[..] .css
107+ book/fonts/open-sans-v17-all-charsets-300-[..] .woff2
108+ book/fonts/open-sans-v17-all-charsets-300italic-[..] .woff2
109+ book/fonts/open-sans-v17-all-charsets-600-[..] .woff2
110+ book/fonts/open-sans-v17-all-charsets-600italic-[..] .woff2
111+ book/fonts/open-sans-v17-all-charsets-700-[..] .woff2
112+ book/fonts/open-sans-v17-all-charsets-700italic-[..] .woff2
113+ book/fonts/open-sans-v17-all-charsets-800-[..] .woff2
114+ book/fonts/open-sans-v17-all-charsets-800italic-[..] .woff2
115+ book/fonts/open-sans-v17-all-charsets-italic-[..] .woff2
116+ book/fonts/open-sans-v17-all-charsets-regular-[..] .woff2
117+ book/fonts/source-code-pro-v11-all-charsets-500-[..] .woff2
116118"# ] ] ,
117119 ) ;
118120}
@@ -121,20 +123,20 @@ book/fonts/source-code-pro-v11-all-charsets-500.woff2
121123#[ test]
122124fn fonts_css ( ) {
123125 BookTest :: from_dir ( "theme/fonts_css" )
124- . check_file_contains ( "book/index.html" , "fonts/fonts.css" )
126+ . check_file_contains ( "book/index.html" , "fonts/fonts-[..] .css" )
125127 . check_file (
126- "book/fonts/fonts.css" ,
128+ "book/fonts/fonts-* .css" ,
127129 str![ [ r#"
128130/*custom*/
129131
130132"# ] ] ,
131133 )
132- . check_file ( "book/fonts/myfont.woff" , str![ [ "" ] ] )
134+ . check_file ( "book/fonts/myfont-* .woff" , str![ [ "" ] ] )
133135 . check_file_list (
134136 "book/fonts" ,
135137 str![ [ r#"
136- book/fonts/fonts.css
137- book/fonts/myfont.woff
138+ book/fonts/fonts-[..] .css
139+ book/fonts/myfont-[..] .woff
138140"# ] ] ,
139141 ) ;
140142}
@@ -167,12 +169,12 @@ fn custom_fonts_css() {
167169
168170"# ] ] ) ;
169171 } )
170- . check_file_contains ( "book/index.html" , "fonts.css" )
172+ . check_file_contains ( "book/index.html" , "fonts-[..] .css" )
171173 . check_file_list (
172174 "book/fonts" ,
173175 str![ [ r#"
174- book/fonts/fonts.css
175- book/fonts/myfont.woff
176+ book/fonts/fonts-[..] .css
177+ book/fonts/myfont-[..] .woff
176178"# ] ] ,
177179 ) ;
178180}
0 commit comments