Skip to content

Commit 49749a5

Browse files
committed
Add a test case
1 parent 6b25868 commit 49749a5

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

‎scarb/tests/patch.rs‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,35 @@ fn default_registry_patched_builtin_assert_macros_available() {
844844
.success();
845845
}
846846

847+
#[test]
848+
fn default_registry_patched_builtin_assert_macros_incompatible_requirement() {
849+
let t = TempDir::new().unwrap();
850+
ProjectBuilder::start()
851+
.dev_dep("starknet", Dep.version("2.17.0"))
852+
.dep_cairo_test()
853+
.manifest_extra(indoc! {r#"
854+
[patch.scarbs-xyz]
855+
starknet = "=1.0.0"
856+
"#})
857+
.lib_cairo(indoc! {r#"
858+
#[test]
859+
fn some() {
860+
}
861+
"#})
862+
.build(&t);
863+
Scarb::quick_command()
864+
.args(["build", "--test"])
865+
.current_dir(&t)
866+
.assert()
867+
.failure()
868+
.stdout_eq(indoc! {r#"
869+
error: cannot get dependencies of `[email protected]`
870+
871+
Caused by:
872+
cannot find package `starknet =1.0.0`
873+
"#});
874+
}
875+
847876
#[test]
848877
fn patch_builtin_to_other_registry_is_not_rewritten() {
849878
let mut registry = LocalRegistry::create();

0 commit comments

Comments
 (0)