aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-04-16 17:59:46 -0300
committerHisham Muhammad <hisham@gobolinux.org>2018-05-07 19:27:37 -0300
commit4dfd5a5501973890af7d9842b190ad01dd5f5b1e (patch)
tree91d7ba9dfa2bfef0240f551708f3e8e2929f58af
parentbcb010c10a795f565271cedb46af6aadba429205 (diff)
downloadluarocks-4dfd5a5501973890af7d9842b190ad01dd5f5b1e.tar.gz
luarocks-4dfd5a5501973890af7d9842b190ad01dd5f5b1e.tar.bz2
luarocks-4dfd5a5501973890af7d9842b190ad01dd5f5b1e.zip
rockspec format: add `test`
Adds a top-level table `test` to the format
-rw-r--r--src/luarocks/type/rockspec.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/luarocks/type/rockspec.lua b/src/luarocks/type/rockspec.lua
index 0364b7fb..bb36cfc3 100644
--- a/src/luarocks/type/rockspec.lua
+++ b/src/luarocks/type/rockspec.lua
@@ -104,6 +104,12 @@ local rockspec_types = {
104 _more = true, 104 _more = true,
105 _mandatory = true 105 _mandatory = true
106 }, 106 },
107 test = {
108 _version = "3.0",
109 platforms = {}, -- recursively defined below
110 type = string_1,
111 _more = true,
112 },
107 hooks = { 113 hooks = {
108 platforms = {}, -- recursively defined below 114 platforms = {}, -- recursively defined below
109 post_install = string_1, 115 post_install = string_1,
@@ -119,6 +125,7 @@ type_rockspec.order = {"rockspec_format", "package", "version",
119 { "description", {"summary", "detailed", "homepage", "license" } }, 125 { "description", {"summary", "detailed", "homepage", "license" } },
120 "supported_platforms", "dependencies", "build_dependencies", "external_dependencies", 126 "supported_platforms", "dependencies", "build_dependencies", "external_dependencies",
121 { "build", {"type", "modules", "copy_directories", "platforms"} }, 127 { "build", {"type", "modules", "copy_directories", "platforms"} },
128 { "test", {"type"} },
122 "hooks"} 129 "hooks"}
123 130
124rockspec_types.build.platforms._any = rockspec_types.build 131rockspec_types.build.platforms._any = rockspec_types.build
@@ -127,6 +134,7 @@ rockspec_types.build_dependencies.platforms._any = rockspec_types.build_dependen
127rockspec_types.external_dependencies.platforms._any = rockspec_types.external_dependencies 134rockspec_types.external_dependencies.platforms._any = rockspec_types.external_dependencies
128rockspec_types.source.platforms._any = rockspec_types.source 135rockspec_types.source.platforms._any = rockspec_types.source
129rockspec_types.hooks.platforms._any = rockspec_types.hooks 136rockspec_types.hooks.platforms._any = rockspec_types.hooks
137rockspec_types.test.platforms._any = rockspec_types.test
130 138
131--- Type check a rockspec table. 139--- Type check a rockspec table.
132-- Verify the correctness of elements from a 140-- Verify the correctness of elements from a