File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -66,3 +66,22 @@ fn book_toml_isnt_required() {
66
66
str![ [ r##"<h1 id="chapter-1"><a class="header" href="#chapter-1">Chapter 1</a></h1>"## ] ] ,
67
67
) ;
68
68
}
69
+
70
+ // Dest dir relative path behavior.
71
+ #[ test]
72
+ fn dest_dir_relative_path ( ) {
73
+ let mut test = BookTest :: from_dir ( "build/basic_build" ) ;
74
+ let current_dir = test. dir . join ( "work" ) ;
75
+ std:: fs:: create_dir_all ( & current_dir) . unwrap ( ) ;
76
+ test. run ( "build" , |cmd| {
77
+ cmd. args ( & [ "--dest-dir" , "foo" , ".." ] )
78
+ . current_dir ( & current_dir)
79
+ . expect_stderr ( str![ [ r#"
80
+ [TIMESTAMP] [INFO] (mdbook_driver::mdbook): Book building has started
81
+ [TIMESTAMP] [INFO] (mdbook_driver::mdbook): Running the html backend
82
+ [TIMESTAMP] [INFO] (mdbook_html::html_handlebars::hbs_renderer): HTML book written to `[ROOT]/work/../foo`
83
+
84
+ "# ] ] ) ;
85
+ } ) ;
86
+ assert ! ( test. dir. join( "foo/index.html" ) . exists( ) ) ;
87
+ }
You can’t perform that action at this time.
0 commit comments