diff --git a/tests/testsuite/build_script.rs b/tests/testsuite/build_script.rs index c1a2dcb6d444..c7eb77d20bcd 100644 --- a/tests/testsuite/build_script.rs +++ b/tests/testsuite/build_script.rs @@ -5164,3 +5164,39 @@ fn custom_build_closes_stdin() { .build(); p.cargo("build").run(); } + +#[cargo_test] +fn test_both_two_semicolons_and_one_semicolon_syntax() { + let p = project() + .file( + "Cargo.toml", + r#" + [package] + name = "foo" + version = "0.0.1" + authors = [] + build = "build.rs" + "#, + ) + .file( + "src/main.rs", + r#" + const FOO: &'static str = env!("FOO"); + const BAR: &'static str = env!("BAR"); + fn main() { + println!("{}", FOO); + println!("{}", BAR); + } + "#, + ) + .file( + "build.rs", + r#"fn main() { + println!("cargo::rustc-env=FOO=foo"); + println!("cargo:rustc-env=BAR=bar"); + }"#, + ) + .build(); + p.cargo("build -v").run(); + p.cargo("run -v").with_stdout("foo\nbar\n").run(); +}