[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/08: tests: elpa: Don't actually download files.
From: |
Ludovic Courtès |
Subject: |
03/08: tests: elpa: Don't actually download files. |
Date: |
Sun, 18 Mar 2018 18:24:31 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 17cdd3d0fe1987d0272f2c3496123be1ef772d6b
Author: Ludovic Courtès <address@hidden>
Date: Sun Mar 18 22:33:41 2018 +0100
tests: elpa: Don't actually download files.
* tests/elpa.scm (eval-test-with-elpa): Mock 'url-fetch'.
---
tests/elpa.scm | 43 +++++++++++++++++++++++++------------------
1 file changed, 25 insertions(+), 18 deletions(-)
diff --git a/tests/elpa.scm b/tests/elpa.scm
index e6d53c8..44e3914 100644
--- a/tests/elpa.scm
+++ b/tests/elpa.scm
@@ -81,24 +81,31 @@ information about package NAME. (Function
'elpa-package-info'.)"
auctex-readme-mock
url)))
(_ #f)))))
- (match (elpa->guix-package pkg)
- (('package
- ('name "emacs-auctex")
- ('version "11.88.6")
- ('source
- ('origin
- ('method 'url-fetch)
- ('uri ('string-append
- "https://elpa.gnu.org/packages/auctex-" 'version ".tar"))
- ('sha256 ('base32 (? string? hash)))))
- ('build-system 'emacs-build-system)
- ('home-page "http://www.gnu.org/software/auctex/")
- ('synopsis "Integrated environment for *TeX*")
- ('description (? string?))
- ('license 'license:gpl3+))
- #t)
- (x
- (pk 'fail x #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)
+ (('package
+ ('name "emacs-auctex")
+ ('version "11.88.6")
+ ('source
+ ('origin
+ ('method 'url-fetch)
+ ('uri ('string-append
+ "https://elpa.gnu.org/packages/auctex-" 'version ".tar"))
+ ('sha256 ('base32 (? string? hash)))))
+ ('build-system 'emacs-build-system)
+ ('home-page "http://www.gnu.org/software/auctex/")
+ ('synopsis "Integrated environment for *TeX*")
+ ('description (? string?))
+ ('license 'license:gpl3+))
+ #t)
+ (x
+ (pk 'fail x #f))))))
(test-assert "elpa->guix-package test 1"
(eval-test-with-elpa "auctex"))
- branch master updated (14f2105 -> 71e08fd), Ludovic Courtès, 2018/03/18
- 01/08: import: elpa: Adjust test for HTTPS URLs., Ludovic Courtès, 2018/03/18
- 02/08: import: elpa: Return 'license:gpl3+ for ELPA only., Ludovic Courtès, 2018/03/18
- 04/08: vm: Display a backtrace upon error by default., Ludovic Courtès, 2018/03/18
- 03/08: tests: elpa: Don't actually download files.,
Ludovic Courtès <=
- 05/08: linux-modules: Add 'current-kernel-directory'., Ludovic Courtès, 2018/03/18
- 06/08: linux-modules: 'load-linux-module*' honors BLACK-LIST in recursive calls., Ludovic Courtès, 2018/03/18
- 08/08: glob: Add an extra glob pattern compilation stage., Ludovic Courtès, 2018/03/18
- 07/08: glob: Support square brackets in patterns., Ludovic Courtès, 2018/03/18