File tree Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Original file line number Diff line number Diff line change @@ -339,14 +339,6 @@ fn custom_fonts() {
339
339
contents. contains ( "fonts/fonts.css" )
340
340
} ;
341
341
342
- // No theme:
343
- let temp = TempFileBuilder :: new ( ) . prefix ( "mdbook" ) . tempdir ( ) . unwrap ( ) ;
344
- let p = temp. path ( ) ;
345
- MDBook :: init ( p) . build ( ) . unwrap ( ) ;
346
- MDBook :: load ( p) . unwrap ( ) . build ( ) . unwrap ( ) ;
347
- assert_eq ! ( actual_files( & p. join( "book/fonts" ) ) , & builtin_fonts) ;
348
- assert ! ( has_fonts_css( p) ) ;
349
-
350
342
// Full theme.
351
343
let temp = TempFileBuilder :: new ( ) . prefix ( "mdbook" ) . tempdir ( ) . unwrap ( ) ;
352
344
let p = temp. path ( ) ;
Original file line number Diff line number Diff line change @@ -42,3 +42,29 @@ This is a modified index.hbs!
42
42
"# ] ] ,
43
43
) ;
44
44
}
45
+
46
+ // After building, what are the default set of fonts?
47
+ #[ test]
48
+ fn default_fonts ( ) {
49
+ BookTest :: init ( |_| { } )
50
+ . check_file_contains ( "book/index.html" , "fonts/fonts.css" )
51
+ . check_file_list (
52
+ "book/fonts" ,
53
+ str![ [ r#"
54
+ book/fonts/OPEN-SANS-LICENSE.txt
55
+ book/fonts/SOURCE-CODE-PRO-LICENSE.txt
56
+ book/fonts/fonts.css
57
+ book/fonts/open-sans-v17-all-charsets-300.woff2
58
+ book/fonts/open-sans-v17-all-charsets-300italic.woff2
59
+ book/fonts/open-sans-v17-all-charsets-600.woff2
60
+ book/fonts/open-sans-v17-all-charsets-600italic.woff2
61
+ book/fonts/open-sans-v17-all-charsets-700.woff2
62
+ book/fonts/open-sans-v17-all-charsets-700italic.woff2
63
+ book/fonts/open-sans-v17-all-charsets-800.woff2
64
+ book/fonts/open-sans-v17-all-charsets-800italic.woff2
65
+ book/fonts/open-sans-v17-all-charsets-italic.woff2
66
+ book/fonts/open-sans-v17-all-charsets-regular.woff2
67
+ book/fonts/source-code-pro-v11-all-charsets-500.woff2
68
+ "# ] ] ,
69
+ ) ;
70
+ }
You can’t perform that action at this time.
0 commit comments