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 @@ -5168,3 +5168,39 @@ fn custom_build_closes_stdin() {
5168
5168
. build ( ) ;
5169
5169
p. cargo ( "build" ) . run ( ) ;
5170
5170
}
5171
+
5172
+ #[ cargo_test]
5173
+ fn test_both_two_semicolons_and_one_semicolon_syntax ( ) {
5174
+ let p = project ( )
5175
+ . file (
5176
+ "Cargo.toml" ,
5177
+ r#"
5178
+ [package]
5179
+ name = "foo"
5180
+ version = "0.0.1"
5181
+ authors = []
5182
+ build = "build.rs"
5183
+ "# ,
5184
+ )
5185
+ . file (
5186
+ "src/main.rs" ,
5187
+ r#"
5188
+ const FOO: &'static str = env!("FOO");
5189
+ const BAR: &'static str = env!("BAR");
5190
+ fn main() {
5191
+ println!("{}", FOO);
5192
+ println!("{}", BAR);
5193
+ }
5194
+ "# ,
5195
+ )
5196
+ . file (
5197
+ "build.rs" ,
5198
+ r#"fn main() {
5199
+ println!("cargo::metadata=rustc-env=FOO=foo");
5200
+ println!("cargo:rustc-env=BAR=bar");
5201
+ }"# ,
5202
+ )
5203
+ . build ( ) ;
5204
+ p. cargo ( "build -v" ) . run ( ) ;
5205
+ p. cargo ( "run -v" ) . with_stdout ( "foo\n bar\n " ) . run ( ) ;
5206
+ }
You can’t perform that action at this time.
0 commit comments