diff --git a/tests/testsuite/git.rs b/tests/testsuite/git.rs index 0fd25bf2db08..06ff4056a10e 100644 --- a/tests/testsuite/git.rs +++ b/tests/testsuite/git.rs @@ -9,7 +9,7 @@ use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use std::thread; -use cargo_test_support::git::cargo_uses_gitoxide; +use cargo_test_support::git::{add_submodule, cargo_uses_gitoxide}; use cargo_test_support::paths; use cargo_test_support::prelude::IntoData; use cargo_test_support::prelude::*; @@ -3847,11 +3847,20 @@ fn corrupted_checkout_with_cli() { } fn _corrupted_checkout(with_cli: bool) { - let git_project = git::new("dep1", |project| { + let (git_project, repository) = git::new_repo("dep1", |project| { project .file("Cargo.toml", &basic_manifest("dep1", "0.5.0")) .file("src/lib.rs", "") }); + + let project2 = git::new("dep2", |project| { + project.no_manifest().file("README.md", "") + }); + let url = project2.root().to_url().to_string(); + add_submodule(&repository, &url, Path::new("bar")); + git::commit(&repository); + drop(repository); + let p = project() .file( "Cargo.toml", @@ -3962,7 +3971,7 @@ fn different_user_relative_submodules() { &format!( r#" [package] - name = "foo" + name = "foo" version = "0.5.0" edition = "2015"