1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

refactor(global): Move from tempdir to tempfile:

* the crate has been deprecated
This commit is contained in:
Sylvestre Ledru 2020-06-09 11:30:19 +02:00
parent 80987250d2
commit ac34d136f2
7 changed files with 26 additions and 49 deletions

View file

@ -1,4 +1,4 @@
extern crate tempdir;
extern crate tempfile;
#[cfg(unix)]
extern crate unix_socket;

View file

@ -1,6 +1,7 @@
use crate::common::util::*;
extern crate tempdir;
use self::tempdir::TempDir;
extern crate tempfile;
use self::tempfile::tempdir;
static TEST_TEMPLATE1: &'static str = "tempXXXXXX";
static TEST_TEMPLATE2: &'static str = "temp";
@ -266,9 +267,9 @@ fn test_mktemp_suffix() {
#[test]
fn test_mktemp_tmpdir() {
let scene = TestScenario::new(util_name!());
let path = TempDir::new_in(scene.fixtures.as_string(), util_name!()).unwrap();
let pathname = path.path().as_os_str();
let dir = tempdir().unwrap();
let path = dir.path().join(scene.fixtures.as_string());
let pathname = path.as_os_str();
scene
.ucmd()