@@ -1005,7 +1005,7 @@ Caused by:
1005
1005
fn do_not_package_if_src_was_modified ( ) {
1006
1006
let p = project ( )
1007
1007
. file ( "src/main.rs" , r#"fn main() { println!("hello"); }"# )
1008
- . file ( "foo.txt" , "" )
1008
+ . file ( "dir/ foo.txt" , "" )
1009
1009
. file ( "bar.txt" , "" )
1010
1010
. file (
1011
1011
"build.rs" ,
@@ -1016,8 +1016,10 @@ fn do_not_package_if_src_was_modified() {
1016
1016
fs::write("src/generated.txt",
1017
1017
"Hello, world of generated files."
1018
1018
).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");
1020
1021
fs::write("bar.txt", "updated content").expect("failed to update");
1022
+ fs::create_dir("new-dir").expect("failed to create dir");
1021
1023
}
1022
1024
"# ,
1023
1025
)
@@ -1033,8 +1035,10 @@ Caused by:
1033
1035
Source directory was modified by build.rs during cargo publish. \
1034
1036
Build scripts should not modify anything outside of OUT_DIR.
1035
1037
Changed: [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
1038
1042
1039
1043
To proceed despite this, pass the `--no-verify` flag." ,
1040
1044
)
0 commit comments