From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WKXFBaiK3mIhSQEAbAwnHQ (envelope-from ) for ; Mon, 25 Jul 2022 14:20:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 8KF8BaiK3mI5JQEAauVa8A (envelope-from ) for ; Mon, 25 Jul 2022 14:20:56 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D8E661C3AD for ; Mon, 25 Jul 2022 14:20:55 +0200 (CEST) Received: from localhost ([::1]:51392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFx4x-0001wV-3G for larch@yhetil.org; Mon, 25 Jul 2022 08:20:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFx3C-0008Pm-CH for guix-patches@gnu.org; Mon, 25 Jul 2022 08:19:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59713) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFx3C-0005PQ-17 for guix-patches@gnu.org; Mon, 25 Jul 2022 08:19:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oFx3B-0002ym-Sf for guix-patches@gnu.org; Mon, 25 Jul 2022 08:19:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56759] [PATCH 19/20] gnu: anystyle: Add tests for dictionary adapters. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Jul 2022 12:19:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56759 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56759@debbugs.gnu.org Cc: Philip McGrath Received: via spool by 56759-submit@debbugs.gnu.org id=B56759.165875152411352 (code B ref 56759); Mon, 25 Jul 2022 12:19:05 +0000 Received: (at 56759) by debbugs.gnu.org; 25 Jul 2022 12:18:44 +0000 Received: from localhost ([127.0.0.1]:49452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFx2q-0002ww-9m for submit@debbugs.gnu.org; Mon, 25 Jul 2022 08:18:44 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:37862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFx2m-0002vt-6L for 56759@debbugs.gnu.org; Mon, 25 Jul 2022 08:18:40 -0400 Received: by mail-qk1-f180.google.com with SMTP id c24so8419504qkm.4 for <56759@debbugs.gnu.org>; Mon, 25 Jul 2022 05:18:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B5QoNIZHLgy9dwKs+IWpG9h6PE6292WjJJN1+479rqI=; b=XSKAa4bmxW3ulWUZsPWt2F+UEIvN9XPXIiotYQf2KNvt4Mby85cAJmrn2aZ6ISzXar 7brP6eqwlbMt/xow8AYNd1bf2lMFWOPDbv+BS/s7v+SkNVsb6v8s98s4vshtrLYHtn9w XtDKZ+RKkeXSCcMxhFrL0VqVcpdtb2L0GEXiWQkV2ks1AV6uxuEjd48PknMcqIKNeUUh 2sQjxAaUJEa8pnhFT5DaN91+U9UZk8I/9Id2XH/8VcO5tIAW+3qxbqOwIH8bv/C2FrlK LTGfuTLcTUYFyKT0eg6UzZWK0C5ExUFzT0xBEMYOWs2ANfKsJ0G/T2WQQkvyycduBnY7 xHZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B5QoNIZHLgy9dwKs+IWpG9h6PE6292WjJJN1+479rqI=; b=NRjWohBh/0dV1v+72hZ6uRR9YXoaKRBDF16nlJG2JsAKUqueB3pqk71/0LaP6VxpKG yUEob4UCW/gEVGskTI05awhx0huh9+pBeOIudZWfzwFhxiQOo6H6SW8WfVRwsU3+qBq6 IIuVGF5Nn+fKIUPR/f48YySg0O2Xv5Vo5WAKb22cgyvaV39Knu38uAY+sidXxpxVzmqF DHbdsVHzXougfSOIIrL4jlt7GKWna7sylDTDpnH55cbEPQeZbuFFF23j2zhgKvMTm9HY SWTWe3YdmorlM6WcNvy2lV8BxLO0+qkJW4Mj1s33iJdyU5sUoo2Vf0E5hMlAX6b9pd0S dCcQ== X-Gm-Message-State: AJIora+omGGYUpgP1tGI8gnzHH+rrK6F5e8Yc/K++AE/XiDeZ3En7air mtH+rIJU+4rsGtC8tjza9cbOM4YS7pS5f0fm X-Google-Smtp-Source: AGRyM1v6je8kqpozTjbOkWWrRmvKkgBsihBygxiIwUpTTkYn+nwZ+15a0A2Um/HWLtb2BHSV+cia/Q== X-Received: by 2002:a05:620a:2701:b0:6b5:e62e:a228 with SMTP id b1-20020a05620a270100b006b5e62ea228mr8766927qkp.600.1658751514758; Mon, 25 Jul 2022 05:18:34 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id q30-20020a37f71e000000b006a79d8c8198sm8616229qkj.135.2022.07.25.05.18.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Jul 2022 05:18:34 -0700 (PDT) From: Philip McGrath Date: Mon, 25 Jul 2022 08:16:34 -0400 Message-Id: <398759e4792d0e3fe644d188eadf96976479eeb5.1658750358.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658751655; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=B5QoNIZHLgy9dwKs+IWpG9h6PE6292WjJJN1+479rqI=; b=RW7eftjitR2zp069uu6N4lS+KiF2amyakGVql8w82WWftrDDnaOdbRLoUWA1ZGGMvKra0U ly+zzoIOHbmnSB1i3oGm4ReKj7kt30nqCS47e/+wHJAGqbwikY1Crkp7SYshj6eXdZhprJ i8ar3kykfqOuf9JxkGS4Mz4Ul4Md2wEIV2Rj/mKDWS9J+W40blVrl9nClNWpQGKJkjz7t+ l9Q9+F+q4tboZDwiLkg6KFZW+KDOYANjq8S1WaQWQBXQJ/bRCZPZTxu+ZjKo0FUSnXuQJo /Y1S2aVwkYHndfxl8cvBKDDvTrFzekliYTK7ekfu/XiY+1XW+1EgNYdLdro0cw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658751655; a=rsa-sha256; cv=none; b=M4BSNjeBYvTaRM5TCuzqv6ET/6cMEz4qALP62ksjuVib/mICO3eWTijzGsGBr6BatDvPc9 4nHy+2cTdv0kbR0dALfJ49sRu1MMbzgLfrCYteuiHHyTob2PQP6ja5II4bQrRPVrL1Rycy IifJUCKLxMofPR1Oa9GA8QzSaKAuXaX4iHpjZ7iyDDhbp01DHtxZYMCcHgCsw7SwnPbySl DB6qbQWTZD7wF9QzDxGp8xhzzWOGRZgNmr1o8g4lOA0yhQLUhO357ejNa9r0ygkaFyRaL7 GLTguliGjglRhKHpXyCbHd0rgtRsjpjxLm1kcQPQzocwwXsVedBNLbs7av3AUg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=XSKAa4bm; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 3.07 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=XSKAa4bm; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D8E661C3AD X-Spam-Score: 3.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: ubc34y2Xvotr * gnu/packages/ruby.scm (anystyle)[arguments]: Instead of deleting the 'check' phase, replace it with a few tests. Add SRFI 1 to '#:modules'. --- gnu/packages/ruby.scm | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 608b1ebe89..8991eb0927 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -13611,6 +13611,7 @@ (define-public anystyle #:modules `((guix build ruby-build-system) (ice-9 popen) + (srfi srfi-1) (guix build utils)) #:phases #~(modify-phases %standard-phases @@ -13619,7 +13620,30 @@ (define-public anystyle (substitute* "anystyle-cli.gemspec" (("'bibtex-ruby', '[^']*'") "'bibtex-ruby'")))) - (delete 'check) ;; there are no upstream tests + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + ;; There are no tests, but let's use this opportunity to do a + ;; basic test of our own that things run ok. It works especially + ;; well to test this here since we know the 'ruby-anystile' + ;; package is in its final, immutable installed form. + (when tests? + (let ((common + `("require 'anystyle'" + ,(string-append + "pp AnyStyle.parse 'Derrida, J. (1967). L’écriture" + " et la différence (1 éd.). Paris: Éditions du" + " Seuil.'")))) + (for-each + (lambda (lines) + (apply invoke "ruby" + (fold-right (lambda (line lst) + (cons* "-e" line lst)) + '() + lines))) + `(,common + ("require 'anystyle/dictionary'" + "AnyStyle::Dictionary.defaults[:adapter] = :gdbm" + ,@common))))))) (add-after 'wrap 'check-cli (lambda* (#:key tests? outputs #:allow-other-keys) (when tests? -- 2.32.0