diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/build_spec.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/build_spec.lua b/spec/build_spec.lua index e498509f..4843ed73 100644 --- a/spec/build_spec.lua +++ b/spec/build_spec.lua | |||
@@ -547,6 +547,27 @@ describe("LuaRocks build #unit", function() | |||
547 | end) | 547 | end) |
548 | 548 | ||
549 | describe("build.builtin", function() | 549 | describe("build.builtin", function() |
550 | it("builtin auto installs files in lua subdir", function() | ||
551 | test_env.run_in_tmp(function(tmpdir) | ||
552 | lfs.mkdir("lua") | ||
553 | write_file("lua_module-1.0-1.rockspec", [[ | ||
554 | package = "lua_module" | ||
555 | version = "1.0-1" | ||
556 | source = { | ||
557 | url = "http://example.com/lua_module" | ||
558 | } | ||
559 | build = { | ||
560 | type = "builtin", | ||
561 | modules = {} | ||
562 | } | ||
563 | ]], finally) | ||
564 | write_file("lua/lua_module.lua", "return 123", finally) | ||
565 | |||
566 | assert.is_true(run.luarocks_bool("build")) | ||
567 | assert.match("[\\/]lua_module%.lua", run.luarocks("show lua_module")) | ||
568 | end, finally) | ||
569 | end) | ||
570 | |||
550 | describe("builtin.autodetect_external_dependencies", function() | 571 | describe("builtin.autodetect_external_dependencies", function() |
551 | it("returns false if the given build table has no external dependencies", function() | 572 | it("returns false if the given build table has no external dependencies", function() |
552 | local build_table = { | 573 | local build_table = { |