diff options
author | Marius Bakke <mbakke@fastmail.com> | 2020-01-21 21:34:41 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2020-01-21 21:34:41 +0100 |
commit | 715110a8a2e9e4b1a89635950744eb5260b8ee7f (patch) | |
tree | 0d0e4c41631092a068d8b0823f4d6b0a8d725eed /tests/texlive.scm | |
parent | b3c2ebda5bcedcfb88475e53b7f36c3a42cac8b4 (diff) | |
parent | 79e074ea10875ff75ca613179c70de12d64b19f5 (diff) | |
download | patches-715110a8a2e9e4b1a89635950744eb5260b8ee7f.tar patches-715110a8a2e9e4b1a89635950744eb5260b8ee7f.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'tests/texlive.scm')
-rw-r--r-- | tests/texlive.scm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/texlive.scm b/tests/texlive.scm index e28eda175c..f7e5515c4c 100644 --- a/tests/texlive.scm +++ b/tests/texlive.scm @@ -20,10 +20,12 @@ #:use-module (gnu packages tex) #:use-module (guix import texlive) #:use-module (guix tests) + #:use-module (guix tests http) #:use-module (guix build utils) #:use-module (srfi srfi-1) #:use-module (srfi srfi-64) #:use-module (srfi srfi-26) + #:use-module (web client) #:use-module (ice-9 match)) (test-begin "texlive") @@ -67,12 +69,14 @@ (keyval (@ (value "tests") (key "topic"))) "\n null\n"))) +;; Avoid collisions with other tests. +(%http-server-port 10200) + (test-equal "fetch-sxml: returns SXML for valid XML" sxml - (mock ((guix http-client) http-fetch - (lambda (url) - xml)) - ((@@ (guix import texlive) fetch-sxml) "foo"))) + (with-http-server `((200 ,xml)) + (parameterize ((current-http-proxy (%local-url))) + (fetch-sxml "foo")))) ;; TODO: (test-assert "sxml->package" @@ -86,7 +90,7 @@ (with-output-to-file (string-append directory "/foo") (lambda () (display "source"))))) - (let ((result ((@@ (guix import texlive) sxml->package) sxml))) + (let ((result (sxml->package sxml))) (match result (('package ('name "texlive-latex-foo") |