We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d5370a commit 4427cfeCopy full SHA for 4427cfe
tests/testsuite/script.rs
@@ -509,6 +509,30 @@ fn main() {
509
.run();
510
}
511
512
+#[cargo_test]
513
+fn test_no_build_rs() {
514
+ let script = r#"#!/usr/bin/env cargo
515
+
516
+fn main() {
517
+ println!("Hello world!");
518
+}"#;
519
+ let p = cargo_test_support::project()
520
+ .file("script.rs", script)
521
+ .file("build.rs", "broken")
522
+ .build();
523
524
+ p.cargo("-Zscript script.rs --help")
525
+ .masquerade_as_nightly_cargo(&["script"])
526
+ .with_status(101)
527
+ .with_stdout(r#""#)
528
+ .with_stderr_contains(
529
+ "\
530
+[ERROR] could not compile `script` (build script) due to previous error
531
+",
532
+ )
533
+ .run();
534
+}
535
536
#[cargo_test]
537
fn test_no_autobins() {
538
let script = r#"#!/usr/bin/env cargo
0 commit comments