blob: dd2dcd002731c5d00004ed20404852bbecba1a96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
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.
--------------------------------------------------------------------------------
================================================================================
TEST: reports when getting a falsy boolean variable
RUN: luarocks config local_by_default
STDOUT:
--------------------------------------------------------------------------------
false
--------------------------------------------------------------------------------
================================================================================
TEST: reports when setting a falsy boolean variable
RUN: luarocks config local_by_default true
STDOUT:
--------------------------------------------------------------------------------
Wrote
local_by_default = true
--------------------------------------------------------------------------------
================================================================================
TEST: reports when getting an unknown variable
RUN: luarocks config foo
EXIT: 1
STDERR:
--------------------------------------------------------------------------------
Error: Unknown entry foo
--------------------------------------------------------------------------------
|