diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/build_spec.lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/build_spec.lua b/spec/build_spec.lua index af2dfe38..ae559654 100644 --- a/spec/build_spec.lua +++ b/spec/build_spec.lua | |||
@@ -311,6 +311,33 @@ describe("LuaRocks build tests #integration", function() | |||
311 | assert.truthy(run.luarocks_bool("build " .. rockspec)) | 311 | assert.truthy(run.luarocks_bool("build " .. rockspec)) |
312 | assert.match("bla.lua", run.luarocks("show autodetect")) | 312 | assert.match("bla.lua", run.luarocks("show autodetect")) |
313 | end) | 313 | end) |
314 | |||
315 | it("'builtin' synthesizes external_dependencies if not given but a library is given in build", function() | ||
316 | local rockspec = "autodetect-1.0-1.rockspec" | ||
317 | test_env.write_file(rockspec, [[ | ||
318 | rockspec_format = "3.0" | ||
319 | package = "autodetect" | ||
320 | version = "1.0-1" | ||
321 | source = { | ||
322 | url = "file://]] .. testing_paths.fixtures_dir .. [[/c_module.c" | ||
323 | } | ||
324 | description = { | ||
325 | summary = "An example rockspec", | ||
326 | } | ||
327 | dependencies = { | ||
328 | "lua >= 5.1" | ||
329 | } | ||
330 | build = { | ||
331 | modules = { | ||
332 | c_module = { | ||
333 | sources = "c_module.c", | ||
334 | libraries = "inexistent_library", | ||
335 | } | ||
336 | } | ||
337 | } | ||
338 | ]], finally) | ||
339 | assert.match("INEXISTENT_LIBRARY_DIR", run.luarocks("build " .. rockspec)) | ||
340 | end) | ||
314 | end) | 341 | end) |
315 | 342 | ||
316 | describe("#mock external dependencies", function() | 343 | describe("#mock external dependencies", function() |