File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -3068,3 +3068,49 @@ For more information, try '--help'.
30683068"# ] ] )
30693069 . run ( ) ;
30703070}
3071+
3072+ #[ cargo_test]
3073+ fn emoji_name ( ) {
3074+ pkg ( "foo" , "0.0.1" ) ;
3075+ cargo_process ( "install 🦀" )
3076+ . with_status ( 101 )
3077+ . with_stdout_data ( "" )
3078+ . with_stderr_data ( str![ [ r#"
3079+
3080+ thread 'main' (939065) panicked at crates/cargo-util/src/registry.rs:24:44:
3081+ byte index 2 is not a char boundary; it is inside '🦀' (bytes 0..4) of `🦀`
3082+ [NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
3083+
3084+ "# ] ] )
3085+ . run ( ) ;
3086+ }
3087+
3088+ #[ cargo_test]
3089+ fn starts_with_number_case ( ) {
3090+ pkg ( "foo" , "0.0.1" ) ;
3091+ cargo_process ( "install 23898932983" )
3092+ . with_status ( 101 )
3093+ . with_stdout_data ( "" )
3094+ . with_stderr_data ( str![ [ r#"
3095+ [UPDATING] `dummy-registry` index
3096+ [ERROR] could not find `23898932983` in registry `crates-io` with version `*`
3097+
3098+ "# ] ] )
3099+ . run ( ) ;
3100+ }
3101+
3102+ #[ cargo_test]
3103+ fn mistaken_flag_case ( ) {
3104+ pkg ( "foo" , "0.0.1" ) ;
3105+ cargo_process ( "install ––path ." ) // en dashes
3106+ . with_status ( 101 )
3107+ . with_stdout_data ( "" )
3108+ . with_stderr_data ( str![ [ r#"
3109+
3110+ thread 'main' (939643) panicked at crates/cargo-util/src/registry.rs:24:44:
3111+ byte index 2 is not a char boundary; it is inside '–' (bytes 0..3) of `––path`
3112+ [NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
3113+
3114+ "# ] ] )
3115+ . run ( ) ;
3116+ }
You can’t perform that action at this time.
0 commit comments