File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 1
1
//! Tests for whether or not warnings are displayed for build scripts.
2
2
3
- #![ allow( deprecated) ]
4
-
5
3
use cargo_test_support:: registry:: Package ;
6
- use cargo_test_support:: { project, Project } ;
4
+ use cargo_test_support:: { project, str , Project } ;
7
5
8
6
static WARNING1 : & str = "Hello! I'm a warning. :)" ;
9
7
static WARNING2 : & str = "And one more!" ;
@@ -65,20 +63,20 @@ fn no_warning_on_success() {
65
63
let upstream = make_upstream ( "" ) ;
66
64
upstream
67
65
. cargo ( "build" )
68
- . with_stderr (
69
- "\
70
- [UPDATING] `[..]` index
66
+ . with_stderr_data ( str![ [ r#"
67
+ [UPDATING] `dummy-registry` index
71
68
[LOCKING] 2 packages to latest compatible versions
72
69
[DOWNLOADING] crates ...
73
- [DOWNLOADED] bar v0.0.1 ([..] )
70
+ [DOWNLOADED] bar v0.0.1 (registry `dummy-registry` )
74
71
[COMPILING] bar v0.0.1
75
- [COMPILING] foo v0.0.1 ([..] )
76
- [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
77
- " ,
78
- )
72
+ [COMPILING] foo v0.0.1 ([ROOT]/foo )
73
+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
74
+
75
+ "# ] ] )
79
76
. run ( ) ;
80
77
}
81
78
79
+ #[ allow( deprecated) ]
82
80
#[ cargo_test]
83
81
fn no_warning_on_bin_failure ( ) {
84
82
make_lib ( "" ) ;
@@ -97,6 +95,7 @@ fn no_warning_on_bin_failure() {
97
95
. run ( ) ;
98
96
}
99
97
98
+ #[ allow( deprecated) ]
100
99
#[ cargo_test]
101
100
fn warning_on_lib_failure ( ) {
102
101
make_lib ( "err()" ) ;
You can’t perform that action at this time.
0 commit comments