File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -861,6 +861,36 @@ This will be considered an error in future versions
861
861
. run ( ) ;
862
862
}
863
863
864
+ #[ cargo_test]
865
+ fn fragment_in_git_url ( ) {
866
+ let p = project ( )
867
+ . file (
868
+ "Cargo.toml" ,
869
+ r#"
870
+ [package]
871
+ name = "foo"
872
+ version = "0.0.0"
873
+ authors = []
874
+
875
+ [dependencies.bar]
876
+ git = "http://127.0.0.1#foo"
877
+ "# ,
878
+ )
879
+ . file ( "src/lib.rs" , "" )
880
+ . build ( ) ;
881
+
882
+ p. cargo ( "build -v" )
883
+ . with_status ( 101 )
884
+ . with_stderr_contains (
885
+ "\
886
+ [WARNING] URL fragment `#foo` in git URL is ignored for dependency (bar). \
887
+ If you were trying to specify a specific git revision, \
888
+ use `rev = \" foo\" ` in the dependency declaration.
889
+ " ,
890
+ )
891
+ . run ( ) ;
892
+ }
893
+
864
894
#[ cargo_test]
865
895
fn bad_source_config1 ( ) {
866
896
let p = project ( )
You can’t perform that action at this time.
0 commit comments