We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27366fd commit 389f263Copy full SHA for 389f263
tests/testsuite/build_dir.rs
@@ -516,6 +516,29 @@ fn template_should_error_for_invalid_variables() {
516
.run();
517
}
518
519
+#[cargo_test]
520
+fn template_should_suggest_nearest_variable() {
521
+ let p = project()
522
+ .file("src/lib.rs", "")
523
+ .file(
524
+ ".cargo/config.toml",
525
+ r#"
526
+ [build]
527
+ build-dir = "{workspace-ro}/build-dir"
528
+ "#,
529
+ )
530
+ .build();
531
+
532
+ p.cargo("build -Z build-dir")
533
+ .masquerade_as_nightly_cargo(&["build-dir"])
534
+ .with_status(101)
535
+ .with_stderr_data(str![[r#"
536
+[ERROR] unexpected variable `workspace-ro` in build.build-dir path `{workspace-ro}/build-dir`
537
538
+"#]])
539
+ .run();
540
+}
541
542
#[cargo_test]
543
fn template_workspace_root() {
544
let p = project()
0 commit comments