Skip to content

Commit

Permalink
Implement unlinkat - Update should_panic for more precise check
Browse files Browse the repository at this point in the history
Updae should_panic attribute for more precise check. Also remove
some dead code and note the pull request ID.
  • Loading branch information
jlb6740 committed Jun 5, 2019
1 parent 16ad363 commit dd9fdd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Add `sched_yield`
([#1050](https://github.com/nix-rust/nix/pull/1050))
- Add `unlinkat`
([#TBD](https://github.com/nix-rust/nix/pull/TBD))
([#TBD](https://github.com/nix-rust/nix/pull/1058))

### Changed
- `PollFd` event flags renamed to `PollFlags` ([#1024](https://github.com/nix-rust/nix/pull/1024/))
Expand Down
3 changes: 1 addition & 2 deletions test/test_unistd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ fn test_symlinkat() {


#[test]
#[should_panic]
#[should_panic (expected="`Err` value: Sys(EISDIR)")]
fn test_unlinkat_dir_noremovedir() {
let tempdir = tempfile::tempdir().unwrap();
let dirname = "foo_dir";
Expand All @@ -593,7 +593,6 @@ fn test_unlinkat_dir_noremovedir() {

// Attempt unlink dir at relative path without proper flag
unlinkat(Some(dirfd), dirname, UnlinkatFlags::NoRemoveDir).unwrap();
assert!(dirpath.exists());
}

#[test]
Expand Down

0 comments on commit dd9fdd5

Please sign in to comment.