File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1096,6 +1096,24 @@ fn no_rebuilding() {
1096
1096
}
1097
1097
}
1098
1098
1099
+ #[test]
1100
+ fn no_recopying() {
1101
+ let p_id = PkgId::new(" foo");
1102
+ let workspace = create_local_package(&p_id);
1103
+ let workspace = workspace.path();
1104
+ command_line_test([~" install", ~" foo"], workspace);
1105
+ let foo_lib = installed_library_in_workspace(&p_id.path, workspace);
1106
+ assert!(foo_lib.is_some());
1107
+ // Now make `foo` read-only so that subsequent attempts to copy to it will fail
1108
+ assert!(chmod_read_only(&foo_lib.unwrap()));
1109
+
1110
+ match command_line_test_partial([~" install", ~" foo"], workspace) {
1111
+ Success(*) => (), // ok
1112
+ Fail(65) => fail!(" no_recopying failed: it tried to re-copy foo"),
1113
+ Fail(_) => fail!(" no_copying failed for some other reason")
1114
+ }
1115
+ }
1116
+
1099
1117
#[test]
1100
1118
fn no_rebuilding_dep() {
1101
1119
let p_id = PkgId::new(" foo");
You can’t perform that action at this time.
0 commit comments