diff options
Diffstat (limited to 'spec/quick/config.q')
| -rw-r--r-- | spec/quick/config.q | 97 |
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. +-------------------------------------------------------------------------------- |
