File tree 1 file changed +36
-0
lines changed
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -5164,3 +5164,39 @@ fn custom_build_closes_stdin() {
5164
5164
. build ( ) ;
5165
5165
p. cargo ( "build" ) . run ( ) ;
5166
5166
}
5167
+
5168
+ #[ cargo_test]
5169
+ fn test_both_two_semicolons_and_one_semicolon_syntax ( ) {
5170
+ let p = project ( )
5171
+ . file (
5172
+ "Cargo.toml" ,
5173
+ r#"
5174
+ [package]
5175
+ name = "foo"
5176
+ version = "0.0.1"
5177
+ authors = []
5178
+ build = "build.rs"
5179
+ "# ,
5180
+ )
5181
+ . file (
5182
+ "src/main.rs" ,
5183
+ r#"
5184
+ const FOO: &'static str = env!("FOO");
5185
+ const BAR: &'static str = env!("BAR");
5186
+ fn main() {
5187
+ println!("{}", FOO);
5188
+ println!("{}", BAR);
5189
+ }
5190
+ "# ,
5191
+ )
5192
+ . file (
5193
+ "build.rs" ,
5194
+ r#"fn main() {
5195
+ println!("cargo::rustc-env=FOO=foo");
5196
+ println!("cargo:rustc-env=BAR=bar");
5197
+ }"# ,
5198
+ )
5199
+ . build ( ) ;
5200
+ p. cargo ( "build -v" ) . run ( ) ;
5201
+ p. cargo ( "run -v" ) . with_stdout ( "foo\n bar\n " ) . run ( ) ;
5202
+ }
You can’t perform that action at this time.
0 commit comments