File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -538,6 +538,33 @@ fn relative_install_location_without_trailing_slash() {
538538 assert_has_installed_exe ( & project_t1, "foo" ) ;
539539}
540540
541+ #[ cargo_test]
542+ fn cli_root_argument_without_deprecation_warning ( ) {
543+ // Verify that using the --root CLI argument does not produce the deprecation warning.
544+ let p = project ( ) . file ( "src/main.rs" , "fn main() {}" ) . build ( ) ;
545+
546+ let root = paths:: root ( ) ;
547+ let root_t1 = root. join ( "t1" ) ;
548+ let p_path = p. root ( ) . to_path_buf ( ) ;
549+ let project_t1 = p_path. join ( "t1" ) ;
550+
551+ cargo_process ( "install --path . --root" )
552+ . arg ( "t1" )
553+ . cwd ( p. root ( ) )
554+ . with_stderr_data ( str![ [ r#"
555+ [INSTALLING] foo v0.0.1 ([ROOT]/foo)
556+ [COMPILING] foo v0.0.1 ([ROOT]/foo)
557+ [FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s
558+ [INSTALLING] [ROOT]/foo/t1/bin/foo[EXE]
559+ [INSTALLED] package `foo v0.0.1 ([ROOT]/foo)` (executable `foo[EXE]`)
560+ [WARNING] be sure to add `[ROOT]/foo/t1/bin` to your PATH to be able to run the installed binaries
561+
562+ "# ] ] )
563+ . run ( ) ;
564+ assert_has_not_installed_exe ( & root_t1, "foo" ) ;
565+ assert_has_installed_exe ( & project_t1, "foo" ) ;
566+ }
567+
541568#[ cargo_test]
542569fn relative_install_location_with_trailing_slash ( ) {
543570 let p = project ( ) . file ( "src/main.rs" , "fn main() {}" ) . build ( ) ;
You can’t perform that action at this time.
0 commit comments