p.cargo("build --bin bin.rs")
.with_status(101)
- .with_stderr("[ERROR] no bin target named `bin.rs`")
+ .with_stderr(
+ "\
+[ERROR] no bin target named `bin.rs`.
+Available bin targets:
+ a
+
+",
+ )
.run();
p.cargo("build --bin a.rs")
p.cargo("build --example example.rs")
.with_status(101)
- .with_stderr("[ERROR] no example target named `example.rs`")
+ .with_stderr(
+ "\
+[ERROR] no example target named `example.rs`.
+Available example targets:
+ a
+
+",
+ )
.run();
p.cargo("build --example a.rs")
For more information on this warning you can consult
https://github.com/rust-lang/cargo/issues/5330
-error: no example target named `a`
+error: no example target named `a`.
+Available example targets:
+ do_magic
+
",
)
.run();
let p = autodiscover_examples_project("2015", Some(false));
p.cargo("run --example a")
.with_status(101)
- .with_stderr("error: no example target named `a`\n")
+ .with_stderr(
+ "\
+error: no example target named `a`.
+Available example targets:
+ do_magic
+
+",
+ )
.run();
}
p.cargo("run --bin bin.rs")
.with_status(101)
- .with_stderr("[ERROR] no bin target named `bin.rs`")
+ .with_stderr(
+ "\
+[ERROR] no bin target named `bin.rs`.
+Available bin targets:
+ a
+
+",
+ )
.run();
p.cargo("run --bin a.rs")
p.cargo("run --example example.rs")
.with_status(101)
- .with_stderr("[ERROR] no example target named `example.rs`")
+ .with_stderr(
+ "\
+[ERROR] no example target named `example.rs`.
+Available example targets:
+ a
+
+",
+ )
.run();
p.cargo("run --example a.rs")
p.cargo("run --example foo")
.with_status(101)
- .with_stderr("[ERROR] no example target named `foo`")
+ .with_stderr(
+ "\
+[ERROR] no example target named `foo`.
+
+",
+ )
.run();
p.cargo("run --bin foo")
.with_status(101)
- .with_stderr("[ERROR] no bin target named `foo`")
+ .with_stderr(
+ "\
+[ERROR] no bin target named `foo`.
+
+",
+ )
.run();
}