mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 03:51:53 +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:
+15
-16
@@ -73,22 +73,21 @@
|
||||
(parameterize ((%metacpan-base-url (%local-url))
|
||||
(current-http-proxy (%local-url)))
|
||||
(match (cpan->guix-package "Foo::Bar")
|
||||
(('package
|
||||
('name "perl-foo-bar")
|
||||
('version "0.1")
|
||||
('source ('origin
|
||||
('method 'url-fetch)
|
||||
('uri ('string-append "http://example.com/Foo-Bar-"
|
||||
'version ".tar.gz"))
|
||||
('sha256
|
||||
('base32
|
||||
(? string? hash)))))
|
||||
('build-system 'perl-build-system)
|
||||
('propagated-inputs ('list 'perl-test-script))
|
||||
('home-page "https://metacpan.org/release/Foo-Bar")
|
||||
('synopsis "Fizzle Fuzz")
|
||||
('description 'fill-in-yourself!)
|
||||
('license 'perl-license))
|
||||
(`(package
|
||||
(name "perl-foo-bar")
|
||||
(version "0.1")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "http://example.com/Foo-Bar-"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 ,(? string? hash)))))
|
||||
(build-system perl-build-system)
|
||||
(propagated-inputs (list perl-test-script))
|
||||
(home-page "https://metacpan.org/release/Foo-Bar")
|
||||
(synopsis "Fizzle Fuzz")
|
||||
(description fill-in-yourself!)
|
||||
(license perl-license))
|
||||
(string=? (bytevector->nix-base32-string
|
||||
(call-with-input-string test-source port-sha256))
|
||||
hash))
|
||||
|
||||
Reference in New Issue
Block a user