gnu: lvm2: Make sure compiled objects are stripped.
[jackhill/guix/guix.git] / tests / cpan.scm
index 5d56f0b..80ff044 100644 (file)
@@ -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.
 ;;;
@@ -65,9 +66,9 @@
              (lambda ()
                (display
                 (match url
-                  ("http://api.metacpan.org/release/Foo-Bar"
+                  ("https://api.metacpan.org/release/Foo-Bar"
                    test-json)
-                  ("http://api.metacpan.org/module/Test::Script"
+                  ("https://api.metacpan.org/module/Test::Script"
                    "{ \"distribution\" : \"Test-Script\" }")
                   ("http://example.com/Foo-Bar-0.1.tar.gz"
                    test-source)
       (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")