File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -2709,3 +2709,41 @@ fn update_breaking_pre_release_upgrade() {
2709
2709
"# ] ] )
2710
2710
. run ( ) ;
2711
2711
}
2712
+
2713
+ #[ cargo_test]
2714
+ fn prefixed_v_in_version ( ) {
2715
+ Package :: new ( "bar" , "1.0.0" ) . publish ( ) ;
2716
+
2717
+ let p = project ( )
2718
+ . file (
2719
+ "Cargo.toml" ,
2720
+ r#"
2721
+ [package]
2722
+ name = "foo"
2723
+ version = "0.0.1"
2724
+ edition = "2015"
2725
+ authors = []
2726
+
2727
+ [dependencies]
2728
+ bar = "1.0.0"
2729
+ "# ,
2730
+ )
2731
+ . file ( "src/lib.rs" , "" )
2732
+ . build ( ) ;
2733
+
2734
+ p. cargo ( "generate-lockfile" ) . run ( ) ;
2735
+
2736
+ Package :: new ( "bar" , "1.0.1" ) . publish ( ) ;
2737
+ p. cargo ( "update bar --precise v1.0.1" )
2738
+ . with_status ( 101 )
2739
+ . with_stderr_data ( str![ [ r#"
2740
+ [ERROR] the version provided, `v1.0.1` is not a valid SemVer version
2741
+
2742
+ [HELP] try changing the version to `1.0.1`
2743
+
2744
+ Caused by:
2745
+ unexpected character 'v' while parsing major version number
2746
+
2747
+ "# ] ] )
2748
+ . run ( ) ;
2749
+ }
You can’t perform that action at this time.
0 commit comments