summaryrefslogtreecommitdiff
path: root/spec/quick/config.q
diff options
context:
space:
mode:
authorMike Vink <mike@pionative.com>2025-02-03 21:29:42 +0100
committerMike Vink <mike@pionative.com>2025-02-03 21:29:42 +0100
commit5155816b7b925dec5d5feb1568b1d7ceb00938b9 (patch)
treedeca28ea15e79f6f804c3d90d2ba757881638af5 /spec/quick/config.q
fetch tarballHEADmaster
Diffstat (limited to 'spec/quick/config.q')
-rw-r--r--spec/quick/config.q97
1 files changed, 97 insertions, 0 deletions
diff --git a/spec/quick/config.q b/spec/quick/config.q
new file mode 100644
index 0000000..d623056
--- /dev/null
+++ b/spec/quick/config.q
@@ -0,0 +1,97 @@
+SUITE: luarocks config
+
+================================================================================
+TEST: --system-config shows the path of the system config
+
+FILE: %{testing_lrprefix}/etc/luarocks/config-%{LUA_VERSION}.lua
+--------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
+RUN: luarocks config --system-config
+
+STDOUT:
+--------------------------------------------------------------------------------
+%{path(%{testing_lrprefix}/etc/luarocks/config-%{LUA_VERSION}.lua)}
+--------------------------------------------------------------------------------
+
+
+
+================================================================================
+TEST: reports when setting a bad LUA_LIBDIR
+
+RUN: luarocks config variables.LUA_LIBDIR /some/bad/path
+
+LuaRocks writes configuration values as they are given, without auto-conversion
+of slashes for Windows:
+
+STDOUT:
+--------------------------------------------------------------------------------
+Wrote
+variables.LUA_LIBDIR = "/some/bad/path"
+--------------------------------------------------------------------------------
+
+STDERR:
+--------------------------------------------------------------------------------
+Warning: Failed finding the Lua library.
+Tried:
+
+LuaRocks may not work correctly when building C modules using this configuration.
+--------------------------------------------------------------------------------
+
+
+
+================================================================================
+TEST: reports when setting a bad LUA_INCDIR
+
+RUN: luarocks config variables.LUA_INCDIR /some/bad/path
+
+STDOUT:
+--------------------------------------------------------------------------------
+Wrote
+variables.LUA_INCDIR = "/some/bad/path"
+--------------------------------------------------------------------------------
+
+LuaRocks uses configuration values as they are given, without auto-conversion
+of slashes for Windows:
+
+STDERR:
+--------------------------------------------------------------------------------
+Warning: Failed finding Lua header lua.h (searched at /some/bad/path). You may need to install Lua development headers.
+
+LuaRocks may not work correctly when building C modules using this configuration.
+--------------------------------------------------------------------------------
+
+
+
+================================================================================
+TEST: rejects setting bad lua_dir
+
+RUN: luarocks config lua_dir /some/bad/dir
+EXIT: 1
+
+STDERR:
+--------------------------------------------------------------------------------
+Lua interpreter not found
+--------------------------------------------------------------------------------
+
+
+
+================================================================================
+TEST: reports when setting a bad LUA_INCDIR
+
+RUN: luarocks config variables.LUA_INCDIR /some/bad/path
+
+STDOUT:
+--------------------------------------------------------------------------------
+Wrote
+variables.LUA_INCDIR = "/some/bad/path"
+--------------------------------------------------------------------------------
+
+LuaRocks uses configuration values as they are given, without auto-conversion
+of slashes for Windows:
+
+STDERR:
+--------------------------------------------------------------------------------
+Warning: Failed finding Lua header lua.h (searched at /some/bad/path). You may need to install Lua development headers.
+
+LuaRocks may not work correctly when building C modules using this configuration.
+--------------------------------------------------------------------------------