;;; 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.
;;;
(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-end "cpan")
+(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")
-\f
-(exit (= (test-runner-fail-count (test-runner-current)) 0))
+(test-end "cpan")