@@ -897,13 +897,10 @@ fn cargo_compile_with_downloaded_dependency_with_offline() {
897
897
898
898
assert_that ( p2. cargo ( "build" ) . masquerade_as_nightly_cargo ( ) . arg ( "-Zoffline" ) ,
899
899
execs ( ) . with_status ( 0 )
900
- . with_stderr_does_not_contain ( "Updating registry" )
901
- . with_stderr_does_not_contain ( "Downloading" )
902
900
. with_stderr ( format ! ( "\
903
901
[COMPILING] present_dep v1.2.3
904
- [COMPILING] bar v0.1.0 ({url})
905
- [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]" ,
906
- url = p2. url( ) ) ) ) ;
902
+ [COMPILING] bar v0.1.0 ([..])
903
+ [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]" ) ) ) ;
907
904
908
905
}
909
906
@@ -923,13 +920,14 @@ fn cargo_compile_offline_not_try_update() {
923
920
924
921
assert_that ( p. cargo ( "build" ) . masquerade_as_nightly_cargo ( ) . arg ( "-Zoffline" ) ,
925
922
execs ( ) . with_status ( 101 )
926
- . with_stderr_does_not_contain ( "Updating registry" )
927
- . with_stderr_does_not_contain ( "Downloading" )
928
923
. with_stderr ( "\
929
924
error: no matching package named `not_cached_dep` found (required by `bar`)
930
925
location searched: registry `[..]`
931
926
version required: ^1.2.5
932
- perhaps an error occurred because you are using the offline mode" ) ) ;
927
+ As a reminder, you're using offline mode (-Z offline) \
928
+ which can sometimes cause surprising resolution failures, \
929
+ if this error is too confusing you may with to retry \
930
+ without the offline flag.") ) ;
933
931
}
934
932
935
933
#[ test]
@@ -987,16 +985,15 @@ fn main(){
987
985
}" )
988
986
. build ( ) ;
989
987
990
- assert_that ( p2. cargo ( "build " ) . masquerade_as_nightly_cargo ( ) . arg ( "-Zoffline" ) ,
988
+ assert_that ( p2. cargo ( "run " ) . masquerade_as_nightly_cargo ( ) . arg ( "-Zoffline" ) ,
991
989
execs ( ) . with_status ( 0 )
992
990
. with_stderr ( format ! ( "\
993
991
[COMPILING] present_dep v1.2.3
994
992
[COMPILING] foo v0.1.0 ({url})
995
- [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]" ,
996
- url = p2. url( ) ) ) ) ;
997
-
998
- assert_that ( process ( & p2. bin ( "foo" ) ) ,
999
- execs ( ) . with_status ( 0 ) . with_stdout ( "1.2.3" ) ) ;
993
+ [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
994
+ Running `[..]`" , url = p2. url( ) ) )
995
+ . with_stdout ( "1.2.3" )
996
+ ) ;
1000
997
}
1001
998
1002
999
#[ test]
@@ -1033,13 +1030,14 @@ fn compile_offline_while_transitive_dep_not_cached() {
1033
1030
1034
1031
assert_that ( p. cargo ( "build" ) . masquerade_as_nightly_cargo ( ) . arg ( "-Zoffline" ) ,
1035
1032
execs ( ) . with_status ( 101 )
1036
- . with_stderr_does_not_contain ( "Updating registry" )
1037
- . with_stderr_does_not_contain ( "Downloading" )
1038
1033
. with_stderr ( "\
1039
1034
error: no matching package named `bar` found (required by `foo`)
1040
1035
location searched: registry `[..]`
1041
1036
version required: = 1.0.0
1042
- perhaps an error occurred because you are using the offline mode" ) ) ;
1037
+ As a reminder, you're using offline mode (-Z offline) \
1038
+ which can sometimes cause surprising resolution failures, \
1039
+ if this error is too confusing you may with to retry \
1040
+ without the offline flag.") ) ;
1043
1041
}
1044
1042
1045
1043
#[ test]
0 commit comments