aboutsummaryrefslogtreecommitdiff
path: root/tests/search-paths.scm
blob: 8dad4244153e5a27e2c7db4a610a9b70bd455a36 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (test-search-paths)
  #:use-module (guix search-paths)
  #:use-module (ice-9 match)
  #:use-module (srfi srfi-64))

(define %top-srcdir
  (dirname (search-path %load-path "guix.scm")))


(test-begin "search-paths")

(test-equal "evaluate-search-paths, separator is #f"
  (string-append %top-srcdir
                 "/gnu/packages/bootstrap/aarch64-linux")

  ;; The following search path spec should evaluate to a single item: the
  ;; first directory that matches the "-linux$" pattern in
  ;; gnu/packages/bootstrap.
  (let ((spec (search-path-specification
               (variable "CHBOUIB")
               (files '("gnu/packages/bootstrap"))
               (file-type 'directory)
               (separator #f)
               (file-pattern "-linux$"))))
    (match (evaluate-search-paths (list spec)
                                  (list %top-srcdir))
      (((spec* . value))
       (and (eq? spec* spec) value)))))

(test-end "search-paths")
d73d592'>nls: Update translations.Julien Lepiller po/guix/ja.po: New file. po/guix/LINGUAS: Add it. 2022-04-02nls: Update translations.Julien Lepiller * po/packages/fi.po: New file. * po/packages/LINGUAS: Add it. 2022-03-01nls: Update translations.Julien Lepiller * po/doc/guix-cookbook.uk.po: New file. * po/doc/local.mk: Add uk cookbook. * doc/local.mk: Add uk cookbook. * po/guix/fa.po: New file. * po/guix/uk.po: New file. * po/guix/LINGUAS: Add fa and uk. 2022-02-04nls: Update translations.Julien Lepiller * po/doc/guix-cookbook.pt_BR.po: New file. * po/doc/local.mk: Add it. * doc/local.mk: Add pt_BR cookbook. 2022-01-09nls: Update translations.Julien Lepiller * po/doc/guix-cookbook.fi.po: New file. * po/doc/guix-manual.fi.po: New file. * po/doc/local.mk: Add them. * doc/local.mk: Add them. * po/guix/fi.po: New file. * po/guix/LINGUAS: Add it. 2021-12-04nls: Update translations.Julien Lepiller 2021-11-06nls: Update translations.Julien Lepiller * po/doc/guix-cookbook.es.po: New file. * po/doc/local.mk: Add 'es' cookbook. * doc/local.mk: Add 'es' cookbook. 2021-10-17nls: Update translations.Julien Lepiller 2021-09-02nls: Update translations.Julien Lepiller * po/packages/it.po: New file. * po/packages/LINGUAS: Add `it'. * po/*/*.po: Update translations. 2021-08-04nls: Update translations.Julien Lepiller * po/doc/guix-cookbook.ru.po: New file. * po/doc/guix-cookbook.sk.po: New file. * po/*/*.po: Update translations. * doc/local.mk (COOKBOOK_LANGUAGES): Add ru and sk. (info_TEXINFOS): Add Russian and Slovak cookbooks. * po/doc/local.mk (DOC_COOKBOOK_PO_FILES): Add Russian and Slovak po files. 2021-05-10nls: New nl and oc translations for the 'packages' component.Maxim Cournoyer * po/packages/nl.po: New file. * po/packages/oc.po: Likewise. * po/packages/LINGUAS: Register them.