From 23a7ea64938cc73d476e42b80a243fefbe7111b2 Mon Sep 17 00:00:00 2001 From: Andreas Fuchs Date: Sun, 1 May 2016 17:20:12 -0700 Subject: Return both the fd and the created path --- test/test_unistd.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/test_unistd.rs') diff --git a/test/test_unistd.rs b/test/test_unistd.rs index 677c1672..9b4bff2c 100644 --- a/test/test_unistd.rs +++ b/test/test_unistd.rs @@ -47,10 +47,11 @@ fn test_wait() { #[test] fn test_mkstemp() { - let result = mkstemp("/tmp/tempfile.XXXXXXXX"); + let result = mkstemp("/tmp/nix_tempfile.XXXXXXXX"); match result { - Ok(fd) => { + Ok((fd, path)) => { close(fd).unwrap(); + unlink(path.as_path()).unwrap(); } Err(e) => panic!("mkstemp failed: {}", e) } -- cgit v1.2.3