We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c730621 commit fa8fd7fCopy full SHA for fa8fd7f
tests/testsuite/script.rs
@@ -813,6 +813,31 @@ Hello world!
813
.run();
814
}
815
816
+#[cargo_test]
817
+fn test_no_autolib() {
818
+ let script = r#"#!/usr/bin/env cargo
819
+
820
+fn main() {
821
+ println!("Hello world!");
822
+}"#;
823
+ let p = cargo_test_support::project()
824
+ .file("script.rs", script)
825
+ .file("src/lib.rs", r#"compile_error!{"must not be built"}"#)
826
+ .build();
827
828
+ p.cargo("-Zscript -v script.rs --help")
829
+ .masquerade_as_nightly_cargo(&["script"])
830
+ .with_status(101)
831
+ .with_stdout_data(str![""])
832
+ .with_stderr_data(str![[r#"
833
+...
834
+[..]compile_error!{"must not be built"}[..]
835
836
837
+"#]])
838
+ .run();
839
+}
840
841
#[cargo_test]
842
fn implicit_target_dir() {
843
let script = ECHO_SCRIPT;
0 commit comments