summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2026-02-16 19:15:03 +0100
committerAndreas Enge <andreas@enge.fr>2026-03-07 11:57:24 +0100
commitee0a9f27b903150c53b732f2dd9f6b1cf204bd78 (patch)
tree43289d3549610dcd718fd52dab0248a75a62c4a1 /tests
parentc2a92688a90f842353f540e2a441def10ed65130 (diff)
import/cran: Fix import of packages in single quotes.
* guix/import/cran.scm (import-pattern): Also match on single quotes. (needed-vignettes-inputs-in-directory): Use EXTRACT-IMPORTS. * tests/import/cran.scm: Add test. Change-Id: Ie69027992519bd8d886860346f4a359514d8e822
Diffstat (limited to 'tests')
-rw-r--r--tests/import/cran.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/import/cran.scm b/tests/import/cran.scm
index 0b6303370ae..19fd580931c 100644
--- a/tests/import/cran.scm
+++ b/tests/import/cran.scm
@@ -1,5 +1,5 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015, 2025 Ricardo Wurmus <rekado@elephly.net> 2;;; Copyright © 2015, 2025-2026 Ricardo Wurmus <rekado@elephly.net>
3;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> 3;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
4;;; 4;;;
5;;; This file is part of GNU Guix. 5;;; This file is part of GNU Guix.
@@ -98,6 +98,11 @@ Date/Publication: 2015-07-14 14:15:16
98 (set->list ((@ (guix import cran) extract-imports) 98 (set->list ((@ (guix import cran) extract-imports)
99 "\"hello::world\", \"this is not data.table::some_procedure(), actually\""))) 99 "\"hello::world\", \"this is not data.table::some_procedure(), actually\"")))
100 100
101(test-equal "extract-imports: extracts text inside single quotes"
102 (list "FDb.InfiniumMethylation.hg19")
103 (set->list ((@ (guix import cran) extract-imports)
104 "suppressPackageStartupMessages(require('FDb.InfiniumMethylation.hg19'))")))
105
101(test-equal "extract-imports: ignores other colon separated things" 106(test-equal "extract-imports: ignores other colon separated things"
102 (list) 107 (list)
103 (set->list ((@ (guix import cran) extract-imports) 108 (set->list ((@ (guix import cran) extract-imports)