File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -352,6 +352,11 @@ impl Serialize for Config {
352
352
let book_config = Value :: try_from ( & self . book ) . expect ( "should always be serializable" ) ;
353
353
table. insert ( "book" , book_config) ;
354
354
355
+ if self . build != BuildConfig :: default ( ) {
356
+ let build_config = Value :: try_from ( & self . build ) . expect ( "should always be serializable" ) ;
357
+ table. insert ( "build" , build_config) ;
358
+ }
359
+
355
360
if self . rust != RustConfig :: default ( ) {
356
361
let rust_config = Value :: try_from ( & self . rust ) . expect ( "should always be serializable" ) ;
357
362
table. insert ( "rust" , rust_config) ;
Original file line number Diff line number Diff line change @@ -91,6 +91,12 @@ fn run_mdbook_init_with_custom_book_and_src_locations() {
91
91
file
92
92
) ;
93
93
}
94
+
95
+ let contents = fs:: read_to_string ( temp. path ( ) . join ( "book.toml" ) ) . unwrap ( ) ;
96
+ assert_eq ! (
97
+ contents,
98
+ "[book]\n authors = []\n language = \" en\" \n multilingual = false\n src = \" in\" \n \n [build]\n build-dir = \" out\" \n create-missing = true\n use-default-preprocessors = true\n "
99
+ ) ;
94
100
}
95
101
96
102
#[ test]
You can’t perform that action at this time.
0 commit comments