From 6ce128bac9a42fb813f6f69b1ae6810da278f1dd Mon Sep 17 00:00:00 2001 From: Julien Roy Date: Wed, 20 Nov 2024 17:44:58 -0500 Subject: [PATCH] dev-crystal/http_proxy: add tests Closes: https://bugs.gentoo.org/943509 Signed-off-by: Julien Roy --- .../http_proxy/http_proxy-0.12.0.ebuild | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dev-crystal/http_proxy/http_proxy-0.12.0.ebuild b/dev-crystal/http_proxy/http_proxy-0.12.0.ebuild index ae2f510baf..6db13a4335 100644 --- a/dev-crystal/http_proxy/http_proxy-0.12.0.ebuild +++ b/dev-crystal/http_proxy/http_proxy-0.12.0.ebuild @@ -12,5 +12,23 @@ SRC_URI="https://github.com/mamantoha/${PN}/archive/refs/tags/v${PV}.tar.gz -> $ LICENSE="MIT" SLOT="0" KEYWORDS="~amd64" +IUSE="test" +RESTRICT="!test? ( test )" DOCS=( {CHANGELOG,README}.md ) + +RDEPEND=" + test? ( dev-crystal/http_proxy ) +" + +src_test() { + # Only run tests that don't need net + crystal_spec \ + "${S}"/spec/client_spec.cr:5 \ + "${S}"/spec/client_spec.cr:13 \ + "${S}"/spec/client_spec.cr:21 \ + "${S}"/spec/client_spec.cr:53 \ + "${S}"/spec/client_spec.cr:101 \ + "${S}"/spec/server_spec.cr:5 \ + "${S}"/spec/server_spec.cr:10 +}