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