File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -308,6 +308,32 @@ fn install_path() {
308
308
. run ( ) ;
309
309
}
310
310
311
+ #[ cargo_test]
312
+ fn install_target_dir ( ) {
313
+ let p = project ( ) . file ( "src/main.rs" , "fn main() {}" ) . build ( ) ;
314
+
315
+ p. cargo ( "install --target-dir td_test" )
316
+ . with_stderr (
317
+ "\
318
+ [WARNING] Using `cargo install` [..]
319
+ [INSTALLING] foo v0.0.1 [..]
320
+ [COMPILING] foo v0.0.1 [..]
321
+ [FINISHED] release [..]
322
+ [INSTALLING] [..]foo
323
+ [INSTALLED] package `foo v0.0.1 [..]foo[..]` (executable `foo[EXE]`)
324
+ [WARNING] be sure to add [..]
325
+ " ,
326
+ )
327
+ . run ( ) ;
328
+
329
+ let mut path = p. root ( ) ;
330
+ path. push ( "td_test" ) ;
331
+ assert ! ( path. exists( ) ) ;
332
+
333
+ path. push ( "release/foo" ) ;
334
+ assert ! ( path. exists( ) ) ;
335
+ }
336
+
311
337
#[ cargo_test]
312
338
fn multiple_crates_error ( ) {
313
339
let p = git:: repo ( & paths:: root ( ) . join ( "foo" ) )
You can’t perform that action at this time.
0 commit comments