[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
42/45: gnu: anystyle: Add tests for dictionary adapters.
From: |
guix-commits |
Subject: |
42/45: gnu: anystyle: Add tests for dictionary adapters. |
Date: |
Thu, 4 Aug 2022 06:07:11 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 9c124671ce0eafe50c1d913976ad6bc619475f9a
Author: Philip McGrath <philip@philipmcgrath.com>
AuthorDate: Mon Jul 25 08:16:34 2022 -0400
gnu: anystyle: Add tests for dictionary adapters.
* gnu/packages/ruby.scm (anystyle)[arguments]: Instead of deleting the
'check' phase, replace it with a few tests. Add SRFI 1 to '#:modules'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
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 0b558de6db..2dba81c2a1 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -13613,6 +13613,7 @@ though the later has not yet been packaged for Guix.")
#:modules
`((guix build ruby-build-system)
(ice-9 popen)
+ (srfi srfi-1)
(guix build utils))
#:phases
#~(modify-phases %standard-phases
@@ -13621,7 +13622,30 @@ though the later has not yet been packaged for Guix.")
(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?
- 08/45: gnu: libomp-13: Reference llvm-13 version string., (continued)
- 08/45: gnu: libomp-13: Reference llvm-13 version string., guix-commits, 2022/08/04
- 21/45: gnu: Add libomp-6., guix-commits, 2022/08/04
- 38/45: gnu: Add ruby-anystyle., guix-commits, 2022/08/04
- 01/45: guix build: Print hints when -s or --target is passed an invalid string., guix-commits, 2022/08/04
- 32/45: gnu: Add ruby-bibtex-ruby., guix-commits, 2022/08/04
- 28/45: gnu: Add ruby-latex-decode., guix-commits, 2022/08/04
- 04/45: gnu: Add barony., guix-commits, 2022/08/04
- 17/45: gnu: Add libomp-8., guix-commits, 2022/08/04
- 03/45: environment: Report "command not found" from the child process., guix-commits, 2022/08/04
- 27/45: gnu: Add ruby-ritex., guix-commits, 2022/08/04
- 42/45: gnu: anystyle: Add tests for dictionary adapters.,
guix-commits <=
- 30/45: gnu: Add ruby-rdf., guix-commits, 2022/08/04
- 22/45: gnu: clang-toolchain-6: Use libomp-6., guix-commits, 2022/08/04
- 14/45: gnu: clang-toolchain-10: Use libomp-10., guix-commits, 2022/08/04
- 44/45: gnu: python-netcdf4: Update to 1.6.0, guix-commits, 2022/08/04