diff options
author | Sewbacca <sewbacca@kolabnow.com> | 2024-03-04 12:57:12 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-03-04 21:52:09 +0000 |
commit | 1f3e8794254d32d44c510e3868378b2f969b0ba6 (patch) | |
tree | 2e0826d5f4694223f4fe7f81e537b280749b33a0 /spec/util/test_env.lua | |
parent | 531393e338746830aa6138c2f671ffc4e4db9e28 (diff) | |
download | luarocks-1f3e8794254d32d44c510e3868378b2f969b0ba6.tar.gz luarocks-1f3e8794254d32d44c510e3868378b2f969b0ba6.tar.bz2 luarocks-1f3e8794254d32d44c510e3868378b2f969b0ba6.zip |
tests: add tests for fs.execute_env using variables with spaces
Co-Authored-By: Hisham Muhammad <hisham@gobolinux.org>
Diffstat (limited to '')
-rw-r--r-- | spec/util/test_env.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/util/test_env.lua b/spec/util/test_env.lua index be75b4ec..2255d141 100644 --- a/spec/util/test_env.lua +++ b/spec/util/test_env.lua | |||
@@ -118,6 +118,16 @@ os.rename = function(a, b) -- luacheck: ignore | |||
118 | return os_rename(V(a), V(b)) | 118 | return os_rename(V(a), V(b)) |
119 | end | 119 | end |
120 | 120 | ||
121 | -- Monkeypatch incorrect tmpname's on some Lua distributions for Windows | ||
122 | local os_tmpname = os.tmpname | ||
123 | os.tmpname = function() -- luacheck:ignore | ||
124 | local name = os_tmpname() | ||
125 | if name:sub(1, 1) == '\\' then | ||
126 | name = os.getenv "TEMP"..name | ||
127 | end | ||
128 | return name | ||
129 | end | ||
130 | |||
121 | local lfs_chdir = lfs.chdir | 131 | local lfs_chdir = lfs.chdir |
122 | lfs.chdir = function(d) -- luacheck: ignore | 132 | lfs.chdir = function(d) -- luacheck: ignore |
123 | return lfs_chdir(V(d)) | 133 | return lfs_chdir(V(d)) |