aboutsummaryrefslogtreecommitdiff
path: root/tests/cpan.scm
diff options
context:
space:
mode:
authorAlex Sassmannshausen <alex@pompo.co>2016-07-02 20:06:02 +0200
committerLudovic Courtès <ludo@gnu.org>2016-07-03 23:58:29 +0200
commit5b8e564ccdc734cda20d151adc1d60d7119fff3b (patch)
tree109b03ddf7319126bf00371989706009624f46e3 /tests/cpan.scm
parent679b535b03ff2c9408ebfaa3baae70736c8455ec (diff)
downloadpatches-5b8e564ccdc734cda20d151adc1d60d7119fff3b.tar
patches-5b8e564ccdc734cda20d151adc1d60d7119fff3b.tar.gz
import: cpan: Use our mirrors for 'https' URLs.
* guix/import/cpan.scm (fix-source-url): New procedure. (cpan-module->sexp): Use it to construct our source-url. * tests/cpan.scm: Add tests for fix-source-url. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests/cpan.scm')
-rw-r--r--tests/cpan.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/cpan.scm b/tests/cpan.scm
index 5d56f0bd2b..898081b3e5 100644
--- a/tests/cpan.scm
+++ b/tests/cpan.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -97,4 +98,14 @@
(x
(pk 'fail x #f)))))
+(test-equal "source-url-http"
+ ((@@ (guix import cpan) fix-source-url)
+ "http://cpan.metacpan.org/authors/id/T/TE/TEST/Foo-Bar-0.1.tar.gz")
+ "mirror://cpan/authors/id/T/TE/TEST/Foo-Bar-0.1.tar.gz")
+
+(test-equal "source-url-https"
+ ((@@ (guix import cpan) fix-source-url)
+ "https://cpan.metacpan.org/authors/id/T/TE/TEST/Foo-Bar-0.1.tar.gz")
+ "mirror://cpan/authors/id/T/TE/TEST/Foo-Bar-0.1.tar.gz")
+
(test-end "cpan")