@@ -399,6 +399,23 @@ fn install_target_dir() {
399399 assert ! ( path. exists( ) ) ;
400400}
401401
402+ #[ cargo_test]
403+ #[ cfg( target_os = "linux" ) ]
404+ fn install_path_with_lowercase_cargo_toml ( ) {
405+ let toml = paths:: root ( ) . join ( "cargo.toml" ) ;
406+ fs:: write ( toml, "" ) . unwrap ( ) ;
407+
408+ cargo_process ( "install --path ." )
409+ . with_status ( 101 )
410+ . with_stderr (
411+ "\
412+ [ERROR] `[CWD]` does not contain a Cargo.toml file, \
413+ but found cargo.toml please try to rename it to Cargo.toml. --path must point to a directory containing a Cargo.toml file.
414+ " ,
415+ )
416+ . run ( ) ;
417+ }
418+
402419#[ cargo_test]
403420fn multiple_crates_error ( ) {
404421 let p = git:: repo ( & paths:: root ( ) . join ( "foo" ) )
@@ -760,6 +777,26 @@ fn git_repo() {
760777 assert_has_installed_exe ( cargo_home ( ) , "foo" ) ;
761778}
762779
780+ #[ cargo_test]
781+ #[ cfg( target_os = "linux" ) ]
782+ fn git_repo_with_lowercase_cargo_toml ( ) {
783+ let p = git:: repo ( & paths:: root ( ) . join ( "foo" ) )
784+ . file ( "cargo.toml" , & basic_manifest ( "foo" , "0.1.0" ) )
785+ . file ( "src/main.rs" , "fn main() {}" )
786+ . build ( ) ;
787+
788+ cargo_process ( "install --git" )
789+ . arg ( p. url ( ) . to_string ( ) )
790+ . with_status ( 101 )
791+ . with_stderr (
792+ "\
793+ [UPDATING] git repository [..]
794+ [ERROR] Could not find Cargo.toml in `[..]`, but found cargo.toml please try to rename it to Cargo.toml
795+ " ,
796+ )
797+ . run ( ) ;
798+ }
799+
763800#[ cargo_test]
764801fn list ( ) {
765802 pkg ( "foo" , "0.0.1" ) ;
0 commit comments