@@ -1005,7 +1005,7 @@ Caused by:
10051005fn do_not_package_if_src_was_modified ( ) {
10061006 let p = project ( )
10071007 . file ( "src/main.rs" , r#"fn main() { println!("hello"); }"# )
1008- . file ( "foo.txt" , "" )
1008+ . file ( "dir/ foo.txt" , "" )
10091009 . file ( "bar.txt" , "" )
10101010 . file (
10111011 "build.rs" ,
@@ -1016,8 +1016,10 @@ fn do_not_package_if_src_was_modified() {
10161016 fs::write("src/generated.txt",
10171017 "Hello, world of generated files."
10181018 ).expect("failed to create file");
1019- fs::remove_file("foo.txt").expect("failed to remove");
1019+ fs::remove_file("dir/foo.txt").expect("failed to remove file");
1020+ fs::remove_dir("dir").expect("failed to remove dir");
10201021 fs::write("bar.txt", "updated content").expect("failed to update");
1022+ fs::create_dir("new-dir").expect("failed to create dir");
10211023 }
10221024 "# ,
10231025 )
@@ -1033,8 +1035,10 @@ Caused by:
10331035 Source directory was modified by build.rs during cargo publish. \
10341036 Build scripts should not modify anything outside of OUT_DIR.
10351037Changed: [CWD]/target/package/foo-0.0.1/bar.txt
1036- Added: [CWD]/target/package/foo-0.0.1/src/generated.txt
1037- Removed: [CWD]/target/package/foo-0.0.1/foo.txt
1038+ Added: [CWD]/target/package/foo-0.0.1/new-dir
1039+ <tab>[CWD]/target/package/foo-0.0.1/src/generated.txt
1040+ Removed: [CWD]/target/package/foo-0.0.1/dir
1041+ <tab>[CWD]/target/package/foo-0.0.1/dir/foo.txt
10381042
10391043To proceed despite this, pass the `--no-verify` flag." ,
10401044 )
0 commit comments