me
/
guix
Archived
1
0
Fork 0

test: lint: Fix ‘haskell-stackage’ test.

This is a follow-up to commit 9c5e5ca1c0.

The previous package was called “ghc-x” which is not available on Stackage,
instead change it to “ghc-pandoc” which does exist, and adjust its version.

* tests/lint.scm ("haskell-stackage"): Add additional metadata for the
  package; change package name to “ghc-pandoc”; and change to version to
  “100.0”.

Reported-by: Tobias Geerinckx-Rice <me@tobias.gr>
Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
master
Xinglu Chen 2021-09-28 20:34:25 +02:00 committed by Tobias Geerinckx-Rice
parent b44bf31aa9
commit 50d2421419
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 9 additions and 8 deletions

View File

@ -1317,29 +1317,30 @@
(test-assert "haskell-stackage" (test-assert "haskell-stackage"
(let* ((stackage (string-append "{ \"packages\": [{" (let* ((stackage (string-append "{ \"packages\": [{"
" \"name\":\"x\"," " \"name\":\"pandoc\","
" \"synopsis\":\"synopsis\","
" \"version\":\"1.0\" }]}")) " \"version\":\"1.0\" }]}"))
(packages (map (lambda (version) (packages (map (lambda (version)
(dummy-package (dummy-package
(string-append "ghc-x") "ghc-pandoc"
(version version) (version version)
(source (source
(dummy-origin (dummy-origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"https://hackage.haskell.org/package/" "https://hackage.haskell.org/package/"
"x-" version "/x-" version ".tar.gz")))))) "pandoc-" version "/pandoc-" version ".tar.gz"))))))
'("0.9" "1.0" "2.0"))) '("0.9" "1.0" "100.0")))
(warnings (pk (with-http-server `((200 ,stackage) ; memoized (warnings (pk (with-http-server `((200 ,stackage) ; memoized
(200 "name: x\nversion: 1.0\n") (200 "name: pandoc\nversion: 1.0\n")
(200 "name: x\nversion: 1.0\n") (200 "name: pandoc\nversion: 1.0\n")
(200 "name: x\nversion: 1.0\n")) (200 "name: pandoc\nversion: 1.0\n"))
(parameterize ((%hackage-url (%local-url)) (parameterize ((%hackage-url (%local-url))
(%stackage-url (%local-url))) (%stackage-url (%local-url)))
(append-map check-haskell-stackage packages)))))) (append-map check-haskell-stackage packages))))))
(match warnings (match warnings
(((? lint-warning? warning)) (((? lint-warning? warning))
(and (string=? (package-version (lint-warning-package warning)) "2.0") (and (string=? (package-version (lint-warning-package warning)) "100.0")
(string-contains (lint-warning-message warning) (string-contains (lint-warning-message warning)
"ahead of Stackage LTS version")))))) "ahead of Stackage LTS version"))))))