@@ -95,7 +95,8 @@ fn basic_unsupported() {
95
95
. credential_provider ( & [ "cargo:token-from-stdout" , "false" ] )
96
96
. build ( ) ;
97
97
98
- cargo_process ( "login abcdefg" )
98
+ cargo_process ( "login" )
99
+ . with_stdin ( "abcdefg" )
99
100
. replace_crates_io ( registry. index_url ( ) )
100
101
. with_status ( 101 )
101
102
. with_stderr_data ( str![ [ r#"
@@ -132,7 +133,8 @@ fn login() {
132
133
] )
133
134
. build ( ) ;
134
135
135
- cargo_process ( "login abcdefg -- cmd3 --cmd4" )
136
+ cargo_process ( "login -- cmd3 --cmd4" )
137
+ . with_stdin ( "abcdefg" )
136
138
. replace_crates_io ( registry. index_url ( ) )
137
139
. with_stderr_data ( str![ [ r#"
138
140
[UPDATING] crates.io index
@@ -383,7 +385,8 @@ fn multiple_providers() {
383
385
)
384
386
. unwrap ( ) ;
385
387
386
- cargo_process ( "login -v abcdefg" )
388
+ cargo_process ( "login -v" )
389
+ . with_stdin ( "abcdefg" )
387
390
. replace_crates_io ( server. index_url ( ) )
388
391
. with_stderr_data ( str![ [ r#"
389
392
[UPDATING] crates.io index
@@ -429,7 +432,8 @@ fn registry_provider_overrides_global() {
429
432
)
430
433
. unwrap ( ) ;
431
434
432
- cargo_process ( "login -v abcdefg" )
435
+ cargo_process ( "login -v" )
436
+ . with_stdin ( "abcdefg" )
433
437
. env ( "CARGO_REGISTRY_CREDENTIAL_PROVIDER" , "cargo:token" )
434
438
. replace_crates_io ( server. index_url ( ) )
435
439
. with_stderr_data ( str![ [ r#"
@@ -460,7 +464,7 @@ fn both_asymmetric_and_token() {
460
464
)
461
465
. unwrap ( ) ;
462
466
463
- cargo_process ( "login -Zasymmetric-token -v abcdefg" )
467
+ cargo_process ( "login -Zasymmetric-token -v" ) . with_stdin ( " abcdefg")
464
468
. masquerade_as_nightly_cargo ( & [ "asymmetric-token" ] )
465
469
. replace_crates_io ( server. index_url ( ) )
466
470
. with_stderr_data ( str![ [ r#"
@@ -675,7 +679,8 @@ fn unsupported_version() {
675
679
. credential_provider ( & [ & provider] )
676
680
. build ( ) ;
677
681
678
- cargo_process ( "login abcdefg" )
682
+ cargo_process ( "login" )
683
+ . with_stdin ( "abcdefg" )
679
684
. replace_crates_io ( registry. index_url ( ) )
680
685
. with_status ( 101 )
681
686
. with_stderr_data ( str![ [ r#"
@@ -707,7 +712,8 @@ fn alias_builtin_warning() {
707
712
)
708
713
. unwrap ( ) ;
709
714
710
- cargo_process ( "login abcdefg" )
715
+ cargo_process ( "login" )
716
+ . with_stdin ( "abcdefg" )
711
717
. replace_crates_io ( registry. index_url ( ) )
712
718
. with_stderr_data ( str![ [ r#"
713
719
[UPDATING] crates.io index
0 commit comments