mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 12:01:49 +02:00
tests: Use quasiquoted 'match' patterns for package sexps.
Turns out it's easier to read.
* tests/cpan.scm ("cpan->guix-package"): Use a quasiquoted pattern.
* tests/elpa.scm (eval-test-with-elpa): Likewise.
* tests/gem.scm ("gem->guix-package")
("gem->guix-package with a specific version")
("gem-recursive-import")
("gem-recursive-import with a specific version"): Likewise.
* tests/hexpm.scm ("hexpm-recursive-import"): Likewise.
* tests/opam.scm ("opam->guix-package"): Likewise.
* tests/pypi.scm ("pypi->guix-package, no wheel")
("pypi->guix-package, wheels")
("pypi->guix-package, no usable requirement file.")
("pypi->guix-package, package name contains \"-\" followed by digits"):
Likewise.
* tests/texlive.scm ("texlive->guix-package"): Likewise.
This commit is contained in:
+16
-17
@@ -92,23 +92,22 @@ url {
|
||||
(lambda _
|
||||
(format #t "~a" test-opam-file))))
|
||||
(match (opam->guix-package "foo" #:repo (list test-repo))
|
||||
(('package
|
||||
('name "ocaml-foo")
|
||||
('version "1.0.0")
|
||||
('source ('origin
|
||||
('method 'url-fetch)
|
||||
('uri "https://example.org/foo-1.0.0.tar.gz")
|
||||
('sha256
|
||||
('base32
|
||||
(? string? hash)))))
|
||||
('build-system 'ocaml-build-system)
|
||||
('propagated-inputs ('list 'ocaml-zarith))
|
||||
('native-inputs
|
||||
('list 'ocaml-alcotest 'ocamlbuild))
|
||||
('home-page "https://example.org/")
|
||||
('synopsis "Some example package")
|
||||
('description "This package is just an example.")
|
||||
('license 'license:bsd-3))
|
||||
(`(package
|
||||
(name "ocaml-foo")
|
||||
(version "1.0.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri "https://example.org/foo-1.0.0.tar.gz")
|
||||
(sha256
|
||||
(base32 ,(? string? hash)))))
|
||||
(build-system ocaml-build-system)
|
||||
(propagated-inputs (list ocaml-zarith))
|
||||
(native-inputs
|
||||
(list ocaml-alcotest ocamlbuild))
|
||||
(home-page "https://example.org/")
|
||||
(synopsis "Some example package")
|
||||
(description "This package is just an example.")
|
||||
(license license:bsd-3))
|
||||
(string=? (bytevector->nix-base32-string
|
||||
test-source-hash)
|
||||
hash))
|
||||
|
||||
Reference in New Issue
Block a user