@@ -4,7 +4,7 @@ use cargo_test_support::paths::CargoPathExt;
4
4
use cargo_test_support:: publish:: validate_crate_contents;
5
5
use cargo_test_support:: registry:: { self , Package } ;
6
6
use cargo_test_support:: {
7
- basic_manifest, cargo_process, git, path2url, paths, project, project_in , symlink_supported, t,
7
+ basic_manifest, cargo_process, git, path2url, paths, project, symlink_supported, t,
8
8
ProjectBuilder ,
9
9
} ;
10
10
use flate2:: read:: GzDecoder ;
@@ -3162,9 +3162,10 @@ src/main.rs
3162
3162
fn include_files_called_target_git ( ) {
3163
3163
// https://github.com/rust-lang/cargo/issues/12790
3164
3164
// files and folders called "target" should be included, unless they're the actual target directory
3165
- let ( p, repo) = git:: new_repo ( "all " , |p| init_and_add_inner_target ( p) ) ;
3165
+ let ( p, repo) = git:: new_repo ( "target_uncommitted " , |p| init_and_add_inner_target ( p) ) ;
3166
3166
// add target folder but not committed.
3167
- let _ = project_in ( & repo. path ( ) . display ( ) . to_string ( ) ) . file ( "target/foo.txt" , "" ) ;
3167
+ let _ = fs:: create_dir_all ( & repo. workdir ( ) . unwrap ( ) . join ( "target/foo.txt" ) ) . unwrap ( ) ;
3168
+
3168
3169
p. cargo ( "package -l" )
3169
3170
. with_stdout (
3170
3171
"\
@@ -3182,7 +3183,7 @@ src/main.rs
3182
3183
. run ( ) ;
3183
3184
3184
3185
// if target is committed, it should be include.
3185
- let p = git:: new ( "all " , |p| {
3186
+ let p = git:: new ( "target_committed " , |p| {
3186
3187
init_and_add_inner_target ( p) . file ( "target/foo.txt" , "" )
3187
3188
} ) ;
3188
3189
p. cargo ( "package -l" )
0 commit comments