diff options
author | Ludovic Courtès <ludo@gnu.org> | 2023-05-31 23:50:06 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-05-31 23:50:06 +0200 |
commit | 654fcf9971bb01389d577be07c6ec0f68940c743 (patch) | |
tree | 59ff22f02c9b265adc4b8f596b9924b586895248 /tests/cpan.scm | |
parent | 9f7cd1fcaf99c8e8430d0b29335220701664dc54 (diff) | |
download | guix-654fcf9971bb01389d577be07c6ec0f68940c743.tar guix-654fcf9971bb01389d577be07c6ec0f68940c743.tar.gz |
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.
Diffstat (limited to 'tests/cpan.scm')
-rw-r--r-- | tests/cpan.scm | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/tests/cpan.scm b/tests/cpan.scm index 5fcce85d8d..e4ee788e9d 100644 --- a/tests/cpan.scm +++ b/tests/cpan.scm @@ -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)) |