File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1
1
//! Tests for displaying the cargo version.
2
2
3
- use cargo_test_support:: { cargo_process, project} ;
3
+ use cargo_test_support:: { cargo_process, project, str } ;
4
4
5
5
#[ cargo_test]
6
6
fn simple ( ) {
7
7
let p = project ( ) . build ( ) ;
8
8
9
9
p. cargo ( "version" )
10
- . with_stdout_data ( & format ! ( "cargo {}\n " , cargo:: version( ) ) )
10
+ . with_stdout_data ( str![ [ r#"
11
+ cargo [VERSION]
12
+
13
+ "# ] ] )
11
14
. run ( ) ;
12
15
13
16
p. cargo ( "--version" )
14
- . with_stdout_data ( & format ! ( "cargo {}\n " , cargo:: version( ) ) )
17
+ . with_stdout_data ( str![ [ r#"
18
+ cargo [VERSION]
19
+
20
+ "# ] ] )
15
21
. run ( ) ;
16
22
17
23
p. cargo ( "-V" )
18
- . with_stdout_data ( & format ! ( "cargo {}\n " , cargo:: version( ) ) )
24
+ . with_stdout_data ( str![ [ r#"
25
+ cargo [VERSION]
26
+
27
+ "# ] ] )
19
28
. run ( ) ;
20
29
}
21
30
@@ -53,7 +62,7 @@ fn verbose() {
53
62
cargo_process ( "-vV" )
54
63
. with_stdout_data ( format ! (
55
64
"\
56
- cargo {}
65
+ cargo [VERSION]
57
66
release: [..]
58
67
commit-hash: [..]
59
68
commit-date: [..]
@@ -63,7 +72,6 @@ libcurl: [..] (sys:[..] [..])
63
72
...
64
73
os: [..]
65
74
" ,
66
- cargo:: version( )
67
75
) )
68
76
. run ( ) ;
69
77
}
You can’t perform that action at this time.
0 commit comments