diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-09-02 15:15:30 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-09-02 15:15:30 +0000 |
commit | 82b51a2b5dd9b5567d4cf15f4bf931d9e39528d1 (patch) | |
tree | 9c3f8eefb8f022159d27cc2a8ffffbd0ff9d22a0 /test/test_unistd.rs | |
parent | 70cce1a384ec21c6ba0ef38d64d2f67333e4b7d7 (diff) | |
parent | ecad72a18e798870ae3591c6ea49a2dd544ba5f3 (diff) | |
download | nix-82b51a2b5dd9b5567d4cf15f4bf931d9e39528d1.zip |
Merge #900
900: deps: update tempfile to 3 r=Susurrus a=ignatenkobrain
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Co-authored-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'test/test_unistd.rs')
-rw-r--r-- | test/test_unistd.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/test_unistd.rs b/test/test_unistd.rs index fe33b1d0..d36a3d39 100644 --- a/test/test_unistd.rs +++ b/test/test_unistd.rs @@ -1,5 +1,3 @@ -extern crate tempdir; - use nix::fcntl::{fcntl, FcntlArg, FdFlag, OFlag}; use nix::unistd::*; use nix::unistd::ForkResult::*; @@ -11,8 +9,7 @@ use std::ffi::CString; use std::fs::File; use std::io::Write; use std::os::unix::prelude::*; -use tempfile::tempfile; -use tempdir::TempDir; +use tempfile::{self, tempfile}; use libc::{self, _exit, off_t}; #[test] @@ -84,7 +81,7 @@ fn test_mkstemp_directory() { #[test] fn test_mkfifo() { - let tempdir = TempDir::new("nix-test_mkfifo").unwrap(); + let tempdir = tempfile::tempdir().unwrap(); let mkfifo_fifo = tempdir.path().join("mkfifo_fifo"); mkfifo(&mkfifo_fifo, Mode::S_IRUSR).unwrap(); @@ -286,7 +283,7 @@ fn test_fchdir() { #[allow(unused_variables)] let m = ::CWD_MTX.lock().expect("Mutex got poisoned by another test"); - let tmpdir = TempDir::new("test_fchdir").unwrap(); + let tmpdir = tempfile::tempdir().unwrap(); let tmpdir_path = tmpdir.path().canonicalize().unwrap(); let tmpdir_fd = File::open(&tmpdir_path).unwrap().into_raw_fd(); @@ -302,7 +299,7 @@ fn test_getcwd() { #[allow(unused_variables)] let m = ::CWD_MTX.lock().expect("Mutex got poisoned by another test"); - let tmpdir = TempDir::new("test_getcwd").unwrap(); + let tmpdir = tempfile::tempdir().unwrap(); let tmpdir_path = tmpdir.path().canonicalize().unwrap(); assert!(chdir(&tmpdir_path).is_ok()); assert_eq!(getcwd().unwrap(), tmpdir_path); |