aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/util/test_env.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/util/test_env.lua b/spec/util/test_env.lua
index b3b9bb77..08d5c850 100644
--- a/spec/util/test_env.lua
+++ b/spec/util/test_env.lua
@@ -88,6 +88,15 @@ function test_env.copy(source, destination)
88 r_destination:close() 88 r_destination:close()
89end 89end
90 90
91function test_env.get_tmp_path()
92 local path = os.tmpname()
93 if test_env.TEST_TARGET_OS == "windows" and not path:find(":") then
94 path = os.getenv("TEMP") .. path
95 end
96 os.remove(path)
97 return path
98end
99
91--- Helper function for execute_bool and execute_output 100--- Helper function for execute_bool and execute_output
92-- @param command string: command to execute 101-- @param command string: command to execute
93-- @param print_command boolean: print command if 'true' 102-- @param print_command boolean: print command if 'true'