tests: elpa: Don't actually download files.
* tests/elpa.scm (eval-test-with-elpa): Mock 'url-fetch'.
This commit is contained in:
parent
9bb1838c3f
commit
17cdd3d0fe
|
@ -81,6 +81,13 @@ information about package NAME. (Function 'elpa-package-info'.)"
|
||||||
auctex-readme-mock
|
auctex-readme-mock
|
||||||
url)))
|
url)))
|
||||||
(_ #f)))))
|
(_ #f)))))
|
||||||
|
(mock
|
||||||
|
((guix build download) url-fetch
|
||||||
|
(lambda (url file . _)
|
||||||
|
(call-with-output-file file
|
||||||
|
(lambda (port)
|
||||||
|
(display "fake tarball" port)))))
|
||||||
|
|
||||||
(match (elpa->guix-package pkg)
|
(match (elpa->guix-package pkg)
|
||||||
(('package
|
(('package
|
||||||
('name "emacs-auctex")
|
('name "emacs-auctex")
|
||||||
|
@ -98,7 +105,7 @@ information about package NAME. (Function 'elpa-package-info'.)"
|
||||||
('license 'license:gpl3+))
|
('license 'license:gpl3+))
|
||||||
#t)
|
#t)
|
||||||
(x
|
(x
|
||||||
(pk 'fail x #f)))))
|
(pk 'fail x #f))))))
|
||||||
|
|
||||||
(test-assert "elpa->guix-package test 1"
|
(test-assert "elpa->guix-package test 1"
|
||||||
(eval-test-with-elpa "auctex"))
|
(eval-test-with-elpa "auctex"))
|
||||||
|
|
Loading…
Reference in New Issue