From 8f7897c5851117d817d59a23353a61e047aee900 Mon Sep 17 00:00:00 2001 From: Ignacio BurgueƱo Date: Wed, 24 Jun 2015 14:43:08 -0300 Subject: Make 'build' field in rockspecs mandatory. Rockspecs must have a 'build' field. If by any chance, it is not needed (see #379), add this: ````lua build = { type = "none" } ```` --- test/testfiles/no_build_table-0.1-1.rockspec | 12 ++++++++++++ test/testing.lua | 1 + test/testing.sh | 1 + 3 files changed, 14 insertions(+) create mode 100644 test/testfiles/no_build_table-0.1-1.rockspec (limited to 'test') diff --git a/test/testfiles/no_build_table-0.1-1.rockspec b/test/testfiles/no_build_table-0.1-1.rockspec new file mode 100644 index 00000000..5d79e9a0 --- /dev/null +++ b/test/testfiles/no_build_table-0.1-1.rockspec @@ -0,0 +1,12 @@ +package = "no_build_table" +version = "0.1-1" +source = { + -- any valid URL + url = "https://raw.github.com/keplerproject/luarocks/master/src/luarocks/build.lua" +} +description = { + summary = "A rockspec with no build field", +} +dependencies = { + "lua >= 5.1" +} diff --git a/test/testing.lua b/test/testing.lua index 86f3ab34..44c6f098 100644 --- a/test/testing.lua +++ b/test/testing.lua @@ -203,6 +203,7 @@ local tests = { fail_lint_type_mismatch_string = function() return run '$luarocks lint "$testing_dir/testfiles/type_mismatch_string-1.0-1.rockspec"' end, fail_lint_type_mismatch_version = function() return run '$luarocks lint "$testing_dir/testfiles/type_mismatch_version-1.0-1.rockspec"' end, fail_lint_type_mismatch_table = function() return run '$luarocks lint "$testing_dir/testfiles/type_mismatch_table-1.0-1.rockspec"' end, + fail_lint_no_build_table = function() return run '$luarocks lint "$testing_dir/testfiles/no_build_table-0.1-1.rockspec"' end, test_list = function() return run "$luarocks list" end, test_list_porcelain = function() return run "$luarocks list --porcelain" end, test_make_with_rockspec = function() diff --git a/test/testing.sh b/test/testing.sh index 8d972d4c..4338e48f 100755 --- a/test/testing.sh +++ b/test/testing.sh @@ -419,6 +419,7 @@ test_lint_ok() { $luarocks download --rockspec validate-args ${verrev_validate_a fail_lint_type_mismatch_string() { $luarocks lint "$testing_dir/testfiles/type_mismatch_string-1.0-1.rockspec"; } fail_lint_type_mismatch_version() { $luarocks lint "$testing_dir/testfiles/type_mismatch_version-1.0-1.rockspec"; } fail_lint_type_mismatch_table() { $luarocks lint "$testing_dir/testfiles/type_mismatch_table-1.0-1.rockspec"; } +fail_lint_no_build_table() { $luarocks lint "$testing_dir/testfiles/no_build_table-0.1-1.rockspec"; } test_list() { $luarocks list; } test_list_porcelain() { $luarocks list --porcelain; } -- cgit v1.2.3-55-g6feb