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/gem.scm | |
parent | 9f7cd1fcaf99c8e8430d0b29335220701664dc54 (diff) | |
download | 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/gem.scm')
-rw-r--r-- | tests/gem.scm | 184 |
1 files changed, 92 insertions, 92 deletions
diff --git a/tests/gem.scm b/tests/gem.scm index a2b5e39077..7e2436e3fb 100644 --- a/tests/gem.scm +++ b/tests/gem.scm @@ -105,21 +105,21 @@ (string-length test-foo-json))) (_ (error "Unexpected URL: " url))))) (match (gem->guix-package "foo") - (('package - ('name "ruby-foo") - ('version "1.0.0") - ('source ('origin - ('method 'url-fetch) - ('uri ('rubygems-uri "foo" 'version)) - ('sha256 - ('base32 + (`(package + (name "ruby-foo") + (version "1.0.0") + (source (origin + (method url-fetch) + (uri (rubygems-uri "foo" version)) + (sha256 + (base32 "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk")))) - ('build-system 'ruby-build-system) - ('propagated-inputs ('list 'bundler 'ruby-bar)) - ('synopsis "A cool gem") - ('description "This package provides a cool gem") - ('home-page "https://example.com") - ('license ('list 'license:expat 'license:asl2.0))) + (build-system ruby-build-system) + (propagated-inputs (list bundler ruby-bar)) + (synopsis "A cool gem") + (description "This package provides a cool gem") + (home-page "https://example.com") + (license (list license:expat license:asl2.0))) #t) (x (pk 'fail x #f))))) @@ -134,21 +134,21 @@ (string-length test-foo-v2-json))) (_ (error "Unexpected URL: " url))))) (match (gem->guix-package "foo" #:version "2.0.0") - (('package - ('name "ruby-foo") - ('version "2.0.0") - ('source ('origin - ('method 'url-fetch) - ('uri ('rubygems-uri "foo" 'version)) - ('sha256 - ('base32 + (`(package + (name "ruby-foo") + (version "2.0.0") + (source (origin + (method url-fetch) + (uri (rubygems-uri "foo" version)) + (sha256 + (base32 "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk")))) - ('build-system 'ruby-build-system) - ('propagated-inputs ('list 'bundler 'ruby-bar)) - ('synopsis "A cool gem") - ('description "This package provides a cool gem") - ('home-page "https://example.com") - ('license ('list 'license:expat 'license:asl2.0))) + (build-system ruby-build-system) + (propagated-inputs (list bundler ruby-bar)) + (synopsis "A cool gem") + (description "This package provides a cool gem") + (home-page "https://example.com") + (license (list license:expat license:asl2.0))) #t) (x (pk 'fail x #f))))) @@ -169,38 +169,38 @@ (string-length test-bundler-json))) (_ (error "Unexpected URL: " url))))) (match (gem-recursive-import "foo") - ((('package - ('name "ruby-bar") - ('version "1.0.0") - ('source - ('origin - ('method 'url-fetch) - ('uri ('rubygems-uri "bar" 'version)) - ('sha256 - ('base32 - "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk")))) - ('build-system 'ruby-build-system) - ('propagated-inputs ('list 'bundler)) - ('synopsis "Another cool gem") - ('description "Another cool gem") - ('home-page "https://example.com") - ('license #f)) ;no licensing info - ('package - ('name "ruby-foo") - ('version "1.0.0") - ('source - ('origin - ('method 'url-fetch) - ('uri ('rubygems-uri "foo" 'version)) - ('sha256 - ('base32 - "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk")))) - ('build-system 'ruby-build-system) - ('propagated-inputs ('list 'bundler 'ruby-bar)) - ('synopsis "A cool gem") - ('description "This package provides a cool gem") - ('home-page "https://example.com") - ('license ('list 'license:expat 'license:asl2.0)))) + (`((package + (name "ruby-bar") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "bar" version)) + (sha256 + (base32 + "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk")))) + (build-system ruby-build-system) + (propagated-inputs (list bundler)) + (synopsis "Another cool gem") + (description "Another cool gem") + (home-page "https://example.com") + (license #f)) ;no licensing info + (package + (name "ruby-foo") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "foo" version)) + (sha256 + (base32 + "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk")))) + (build-system ruby-build-system) + (propagated-inputs (list bundler ruby-bar)) + (synopsis "A cool gem") + (description "This package provides a cool gem") + (home-page "https://example.com") + (license (list license:expat license:asl2.0)))) #t) (x (pk 'fail x #f))))) @@ -221,38 +221,38 @@ (string-length test-bundler-json))) (_ (error "Unexpected URL: " url))))) (match (gem-recursive-import "foo" "2.0.0") - ((('package - ('name "ruby-bar") - ('version "1.0.0") - ('source - ('origin - ('method 'url-fetch) - ('uri ('rubygems-uri "bar" 'version)) - ('sha256 - ('base32 - "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk")))) - ('build-system 'ruby-build-system) - ('propagated-inputs ('list 'bundler)) - ('synopsis "Another cool gem") - ('description "Another cool gem") - ('home-page "https://example.com") - ('license #f)) ;no licensing info - ('package - ('name "ruby-foo") - ('version "2.0.0") - ('source - ('origin - ('method 'url-fetch) - ('uri ('rubygems-uri "foo" 'version)) - ('sha256 - ('base32 - "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk")))) - ('build-system 'ruby-build-system) - ('propagated-inputs ('list 'bundler 'ruby-bar)) - ('synopsis "A cool gem") - ('description "This package provides a cool gem") - ('home-page "https://example.com") - ('license ('list 'license:expat 'license:asl2.0)))) + (`((package + (name "ruby-bar") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "bar" version)) + (sha256 + (base32 + "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk")))) + (build-system ruby-build-system) + (propagated-inputs (list bundler)) + (synopsis "Another cool gem") + (description "Another cool gem") + (home-page "https://example.com") + (license #f)) ;no licensing info + (package + (name "ruby-foo") + (version "2.0.0") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "foo" version)) + (sha256 + (base32 + "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk")))) + (build-system ruby-build-system) + (propagated-inputs (list bundler ruby-bar)) + (synopsis "A cool gem") + (description "This package provides a cool gem") + (home-page "https://example.com") + (license (list license:expat license:asl2.0)))) #t) (x (pk 'fail x #f))))) |