From patchwork Mon Jul 25 12:16:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 40941 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8C6BF27BBEA; Mon, 25 Jul 2022 13:20:55 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3F71927BBE9 for ; Mon, 25 Jul 2022 13:20:55 +0100 (BST) Received: from localhost ([::1]:51392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFx4w-0001wV-Dk for patchwork@mira.cbaines.net; Mon, 25 Jul 2022 08:20:54 -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 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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?