diff options
| author | bors <bors@rust-lang.org> | 2013-11-09 04:11:13 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-11-09 04:11:13 -0800 |
| commit | 7bb668defdabb39a4e15bb3a49f9d16e31767fb0 (patch) | |
| tree | e9dbeade531c87a42b4702b2a32cfe3dc73c7ca7 | |
| parent | 4f68d1365abc71d0b63c7167c6a4625104912af2 (diff) | |
| parent | b60de8a1f6fe343f99203036e39ec82c3c6fd1b9 (diff) | |
| download | rust-7bb668defdabb39a4e15bb3a49f9d16e31767fb0.tar.gz rust-7bb668defdabb39a4e15bb3a49f9d16e31767fb0.zip | |
auto merge of #10371 : catamorphism/rust/rustpkg-issue-9482, r=catamorphism
This bug was already fixed, just needed a test. Closes #9569
| -rw-r--r-- | src/librustpkg/tests.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/librustpkg/tests.rs b/src/librustpkg/tests.rs index b45e4ff1755..4460d1701b5 100644 --- a/src/librustpkg/tests.rs +++ b/src/librustpkg/tests.rs @@ -1097,6 +1097,24 @@ fn no_rebuilding() { } #[test] +fn no_recopying() { + let p_id = PkgId::new("foo"); + let workspace = create_local_package(&p_id); + let workspace = workspace.path(); + command_line_test([~"install", ~"foo"], workspace); + let foo_lib = installed_library_in_workspace(&p_id.path, workspace); + assert!(foo_lib.is_some()); + // Now make `foo` read-only so that subsequent attempts to copy to it will fail + assert!(chmod_read_only(&foo_lib.unwrap())); + + match command_line_test_partial([~"install", ~"foo"], workspace) { + Success(*) => (), // ok + Fail(65) => fail!("no_recopying failed: it tried to re-copy foo"), + Fail(_) => fail!("no_copying failed for some other reason") + } +} + +#[test] fn no_rebuilding_dep() { let p_id = PkgId::new("foo"); let dep_id = PkgId::new("bar"); |
