From d28b6669bdc28318bed47d37cfa6968a07654a23 Mon Sep 17 00:00:00 2001 From: George Roman Date: Tue, 29 May 2018 12:28:08 +0300 Subject: Update fs_spec to use test_env temporary path utility --- spec/fs_spec.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/spec/fs_spec.lua b/spec/fs_spec.lua index 29176af5..b250e321 100644 --- a/spec/fs_spec.lua +++ b/spec/fs_spec.lua @@ -6,17 +6,9 @@ local lfs = require("lfs") local is_win = test_env.TEST_TARGET_OS == "windows" local posix_ok = pcall(require, "posix") local testing_paths = test_env.testing_paths +local get_tmp_path = test_env.get_tmp_path describe("Luarocks fs test #whitebox #w_fs", function() - local get_tmp_path = function() - local path = os.tmpname() - if is_win and not path:find(":") then - path = os.getenv("TEMP") .. path - end - os.remove(path) - return path - end - local exists_file = function(path) local ok, err, code = os.rename(path, path) if not ok and code == 13 then -- cgit v1.2.3-55-g6feb