summaryrefslogtreecommitdiff
path: root/dev-lua/luassert
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lua/luassert')
-rw-r--r--dev-lua/luassert/Manifest6
-rw-r--r--dev-lua/luassert/files/luassert-1.8.0-disable-highlightcolor-test.patch57
-rw-r--r--dev-lua/luassert/luassert-1.8.0-r101.ebuild55
-rw-r--r--dev-lua/luassert/luassert-1.8.0.ebuild2
-rw-r--r--dev-lua/luassert/metadata.xml6
5 files changed, 122 insertions, 4 deletions
diff --git a/dev-lua/luassert/Manifest b/dev-lua/luassert/Manifest
index ae97f17fdcb7..09bf27745ca3 100644
--- a/dev-lua/luassert/Manifest
+++ b/dev-lua/luassert/Manifest
@@ -1,7 +1,9 @@
+AUX luassert-1.8.0-disable-highlightcolor-test.patch 2931 BLAKE2B dcf614b08aa0e89404d18e9bdc77ac5b723d577b8f5694f7fded74275c8ace59e938ddd2ad46b19a9ba7d8a36886d36db384d6fb439a2cccee77cf370e711060 SHA512 0bf9b3877e78183d5db3d33acb977f64e1aa7934f313838ffb5ec9b759283b21f071c619020ca4b8ec8aa36d9ea4e8082e3510d59d800fbd82fef74e0d8b9895
DIST luassert-1.7.10.tar.gz 35789 BLAKE2B c9aaca445272957a5d67d09700f6dc4c1c6c191d3ea274b97afe874f2f5ea1dfda051bd5674d33b9c040e55aed05f2c7baf01431d762223db57cd05b1c4a68a5 SHA512 2d5ca354b5f7b971f0d3420c305d921143cd7f9e1a6f4559cb466b833886a00a045e7b7c594bd9ec3c929b3d5bb8a7a4a6de75a6599e5cba7614b7652061bf05
DIST luassert-1.7.9.tar.gz 34803 BLAKE2B bcaacff85ddd1c85b39241dbd2c7eef28f3697318e2a942521dd60eade5dfc9da9f0c69d570f5a9556b49609f1bb79250cec9ba39a98e4a65627d6479f9e2f2a SHA512 4e1257bf7adaa9002af7c6ac15f2d042c9094ceeae9ce065c51296c663a99fa239ac8d37f106151100478cde8c68d3290b42588553ac681d183e7edef288414b
DIST luassert-1.8.0.tar.gz 38874 BLAKE2B ebc4aab1de5dc830d0b9266726ca6bf361e03000f3a8acd27c04805a6c963373755c8e163b187714f64178acc5d755c05493d745b55c785e3254dd41aa4bef31 SHA512 18b296fececa6b0d5950b2a20c4d30da3bbf9b0932c568bbb8ca212b5c82a1047b73c52ee72b4505a41a393d41dd21321189367e038dd029152d177e11bafc93
EBUILD luassert-1.7.10.ebuild 874 BLAKE2B 52842a1da1aa2f7403ad84eb8038361e738f0c54ae5c298a01f5aad4924e79da65464a97674d20974efc7150e20d124fe40693fa285b8ffcee6f91d7cbccab36 SHA512 9bfda9a13d9a1e46e5c04a28905a1341ff7782ec4f22a714470a48d03956ea2864e5ca5effc8bab26115e9d05f153f5300d46e004f35883558a923bdb08acdf8
EBUILD luassert-1.7.9.ebuild 609 BLAKE2B bb29a2069407537bd1e0bb9dc7561951c4615c6405108d11f83fd8132d032e0696f16be288e365a0b4201a41e45dda36e8b360313d58d1b7b0b58628b0c62b59 SHA512 920ca16cdb8eb819218d6eeaf97fcfb18777f68963cc79249622e856b7ef35cc8231e7436c8cb84a673ea50ce20dd95960834be0f19d71c2041e827a3f51bd9d
-EBUILD luassert-1.8.0.ebuild 964 BLAKE2B 32f893d6b00623c8a9afe92e0adec313b37f865ed7da3a5d21bd471e1205f0b7eac23bc8c3220d73bcb36b4076e8b4dd53857cfa4f2ecea29ef854edfd0350e1 SHA512 171af919bbe8a5f1a18b1ef61e888baf25aee1e6b73da9fd201785d658a228ffaa50e285595b0f5873bb5cfe992d7ceaf2e0611fc1cf65439e76657ca74c2b7d
-MISC metadata.xml 497 BLAKE2B 009bcaf2379e9d29771f83aba63ad50ec2e9e02a328e9605a8d2e171e43e59025aab51ba876206d58f86fd7d0e51a28e9d0d1851f0cc4d87c2cce02e11b048a6 SHA512 8bb0c5cc23259fd9e259620ecde2b377220b3d8062b5229777d811b3827a36d770c2518245009be328f932a5fe6f84ecb719d7e9ff604d7cb4524d9a59811f6b
+EBUILD luassert-1.8.0-r101.ebuild 994 BLAKE2B d0a8cab68455d3acef5aaa3890f482c1e7c6980c89026486a31b5b239b0fbff0624ba7cad1dbf0c3300ce3d1d9426ec3d7378b823f28ac85abf4c6bb63e5545a SHA512 bcb03b7f471d304b9a9bf374f1ab405b85950b5eba27836be0a7d27733fc7b6f8aa24b4cab804a6354f235ca0114da2d01a5aed61992459e6fbf8e625422aeb8
+EBUILD luassert-1.8.0.ebuild 962 BLAKE2B 153ecbd4a7d0b0baf03d0f5a2b1237f3cddc870689128cdae95cc5642c3b1f75b787a1e66c26a4f8019640519568baa5479d65ae7bea8477e68013704358c3d5 SHA512 0dce6316060cc9a2afe25450f4e362b2c5f482bb34fce5d32bb7bc70a56d9ce260c46e22e8f8f8f208f3b9fa51ea38b19077f1e99ea10007f26863392fb590a4
+MISC metadata.xml 598 BLAKE2B 44f0ff617e32241bc72db4da50d83f321cae964924c7dd6c12c46b356158d0ca4a99f228042b2c51e7bdbc0e4573b45cdc15814e5cf73e8a4e4fda450df58ab7 SHA512 d5d5330dba6b543ca5ec99235444ead2c736c2319689513767a27cc654837bb645ab60365e2dd96f9e7ffbd3dbc9c4b3ff5029ad59655bf88bec1f7faa50f80a
diff --git a/dev-lua/luassert/files/luassert-1.8.0-disable-highlightcolor-test.patch b/dev-lua/luassert/files/luassert-1.8.0-disable-highlightcolor-test.patch
new file mode 100644
index 000000000000..fe3f7815a04e
--- /dev/null
+++ b/dev-lua/luassert/files/luassert-1.8.0-disable-highlightcolor-test.patch
@@ -0,0 +1,57 @@
+--- a/spec/formatters_spec.lua
++++ b/spec/formatters_spec.lua
+@@ -102,18 +102,6 @@
+ assert.is.equal(expected, formatted)
+ end)
+
+- it("Checks to see if TableErrorHighlightColor changes error color", function()
+- local ok, colors = pcall(require, "term.colors")
+- if not ok then pending("lua term.colors not available") end
+-
+- assert:set_parameter("TableErrorHighlightColor", "red")
+- local t = {1,2,3}
+- local fmtargs = { {crumbs = {2}} }
+- local formatted = assert:format({t, n = 1, fmtargs = fmtargs})[1]
+- local expected = string.format("("..tostring(t)..") {\n [1] = 1\n %s[2] = 2\n [3] = 3 }", colors.red("*"))
+- assert.is.equal(expected, formatted)
+- end)
+-
+ it("Checks to see if self referencing tables can be formatted", function()
+ local t = {1,2}
+ t[3] = t
+--- a/spec/assertions_spec.lua
++++ b/spec/assertions_spec.lua
+@@ -472,17 +472,6 @@
+ assert.no_error_matches(t_ok, ".*")
+ end)
+
+- it("Checks error_matches compares error strings with pattern", function()
+- assert.error_matches(function() error() end, nil)
+- assert.no_error_matches(function() end, nil)
+- assert.does_error_match(function() error(123) end, "^%d+$")
+- assert.error.matches(function() error("string") end, "^%w+$")
+- assert.matches.error(function() error("string") end, "str", nil, true)
+- assert.matches_error(function() error("123string") end, "^[^0-9]+", 4)
+- assert.has_no_error.match(function() error("123string") end, "123", 4, true)
+- assert.does_not.match_error(function() error("string") end, "^%w+$", nil, true)
+- end)
+-
+ it("Checks error_matches does not compare error objects", function()
+ local func = function() end
+ assert.no_error_matches(function() error({ "table" }) end, "table")
+@@ -557,15 +546,6 @@
+ assert.is_same({}, {assert.has_no_match("%d+", "string", nil, true, "message")})
+ end)
+
+- it("Checks assert.has_error returns thrown error on success", function()
+- assert.is_same({"err message", "err message"}, {assert.has_error(function() error("err message") end, "err message")})
+- assert.is_same({"err", "err"}, {assert.has_error(function() error(setmetatable({},{__tostring = function() return "err" end})) end, "err")})
+- assert.is_same({{}, {}}, {assert.has_error(function() error({}) end, {})})
+- assert.is_same({'0', 0}, {assert.has_error(function() error(0) end, 0)})
+- assert.is_same({nil, nil}, {assert.has_error(function() error(nil) end, nil)})
+- assert.is_same({nil, "string"}, {assert.has_no_error(function() end, "string")})
+- end)
+-
+ it("Checks assert.error_matches returns captures of thrown error on success", function()
+ assert.is_same({"err", "message"}, {assert.error_matches(function() error("err message") end, "(err) (%w+)$")})
+ assert.is_same({"err"}, {assert.error_matches(function() error(setmetatable({},{__tostring = function() return "err" end})) end, "err", nil, true)})
diff --git a/dev-lua/luassert/luassert-1.8.0-r101.ebuild b/dev-lua/luassert/luassert-1.8.0-r101.ebuild
new file mode 100644
index 000000000000..a5902ef63a15
--- /dev/null
+++ b/dev-lua/luassert/luassert-1.8.0-r101.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{1..3} luajit )
+
+inherit lua toolchain-funcs
+
+DESCRIPTION="Assertion library for Lua"
+HOMEPAGE="http://olivinelabs.com/busted/"
+SRC_URI="https://github.com/Olivine-Labs/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="test"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-lua/say-1.3_p1-r100[${LUA_USEDEP}]
+ ${LUA_DEPS}
+"
+
+BDEPEND="
+ virtual/pkgconfig
+ test? (
+ >=dev-lua/busted-2.0.0-r100[${LUA_USEDEP}]
+ ${RDEPEND}
+ )
+"
+
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}/${PN}-1.8.0-disable-highlightcolor-test.patch" )
+
+lua_src_test() {
+ busted --lua=${ELUA} || die
+}
+
+src_test() {
+ lua_foreach_impl lua_src_test
+}
+
+lua_src_install() {
+ insinto $(lua_get_lmod_dir)/luassert
+ doins -r src/.
+
+ einstalldocs
+}
+
+src_install() {
+ lua_foreach_impl lua_src_install
+}
diff --git a/dev-lua/luassert/luassert-1.8.0.ebuild b/dev-lua/luassert/luassert-1.8.0.ebuild
index af01777b7a73..a5f95453c020 100644
--- a/dev-lua/luassert/luassert-1.8.0.ebuild
+++ b/dev-lua/luassert/luassert-1.8.0.ebuild
@@ -11,7 +11,7 @@ SRC_URI="https://github.com/Olivine-Labs/luassert/archive/v${PV}.tar.gz -> ${P}.
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~amd64 arm ~arm64 ~ppc ~ppc64 x86"
+KEYWORDS="~amd64 arm arm64 ppc ~ppc64 x86"
IUSE="luajit test"
RESTRICT="test" # Requires same version to be installed or busted will fail.
diff --git a/dev-lua/luassert/metadata.xml b/dev-lua/luassert/metadata.xml
index 0c230917f9a9..7a9d0e9a4307 100644
--- a/dev-lua/luassert/metadata.xml
+++ b/dev-lua/luassert/metadata.xml
@@ -5,7 +5,11 @@
<email>williamh@gentoo.org</email>
<name>William Hubbs</name>
</maintainer>
- <longdescription lang="en">
+ <maintainer type="person">
+ <email>conikost@gentoo.org</email>
+ <name>Conrad Kostecki</name>
+ </maintainer>
+ <longdescription>
Adds a framework that allows registering new assertions
without compromising builtin assertion functionality.
</longdescription>