summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2017-05-04 11:52:33 +0200
committerMathieu Othacehe <m.othacehe@gmail.com>2017-05-13 12:40:20 +0200
commitdb427602d8f993ee0025fa68d1af274aa8d69ab9 (patch)
tree1404610f9662a09f5e81a6ff638ab16013b26b95 /tests
parenta5e8f5972cb0d69684bb3f81220a6408815f7fe0 (diff)
downloadpatches-db427602d8f993ee0025fa68d1af274aa8d69ab9.tar
patches-db427602d8f993ee0025fa68d1af274aa8d69ab9.tar.gz
import: cran: Robustify cran-package?.
* guix/import/cran.scm (package->upstream-name): Return #f if url start and end index could not be determined. (cran-package?): Check if the upstream-name can be extracted from given package. * tests/cran.scm: Add "r-minimal is not a cran package" to make sure that r-minimal is not detected as a cran package. This fixes a failure of guix refresh on r-minimal because no upsteam-name can be determined from ".../R-version.tar.gz" uri.
Diffstat (limited to 'tests')
-rw-r--r--tests/cran.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/cran.scm b/tests/cran.scm
index c162d45d8a..d785ec5db1 100644
--- a/tests/cran.scm
+++ b/tests/cran.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -17,6 +18,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (test-cran)
+ #:use-module (gnu packages statistics)
#:use-module (guix import cran)
#:use-module (guix tests)
#:use-module (srfi srfi-1)
@@ -86,6 +88,10 @@ Date/Publication: 2015-07-14 14:15:16
'()
((@@ (guix import cran) listify) simple-alist "BadList"))
+(test-equal "r-mininal is not a cran package"
+ #f
+ ((@@ (guix import cran) cran-package?) r-minimal))
+
(test-assert "description->package"
;; Replace network resources with sample data.
(mock ((guix build download) url-fetch