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")
='msg-avail'>...Hartmut Goebel 2016-10-19lint: Suggest @code instead of quotes....Ludovic Courtès 2016-10-03lint: 'cve' checker reports the replacement's vulnerabilities....Ludovic Courtès 2016-08-28guix: lint: Check descriptions for trademark signs....Eric Bavier 2016-07-24lint: 'inputs-should-be-native' checks for intltool, itstool and glib:bin....David Craven 2016-07-13lint: 'validate-uri' reports suspiciously small 200 responses....Ludovic Courtès 2016-04-28lint: 'check-vulnerabilities' follows package replacements....Ludovic Courtès 2016-04-27lint: Report synopses/descriptions that are not strings....Ludovic Courtès 2016-04-03build: Add a Guile custom test driver using SRFI-64....Mathieu Lirzin 2016-01-28tests: Use 'dummy-origin' for lint tests when possible....Mathieu Lirzin 2016-01-22tests: Prevent 'http_proxy' from breaking Web server tests....Ludovic Courtès 2015-11-28lint: Do not report already-patched vulnerabilities....Ludovic Courtès 2015-11-26lint: Add "cve" checker....Ludovic Courtès 2015-09-18lint: Report lonely parentheses....Ludovic Courtès 2015-09-15lint: Add 'check-texinfo-markup' checker....Mathieu Lirzin 2015-09-14guix: lint: Check for meaningful origin file names....Eric Bavier 2015-09-06lint: Add 'license' checker....Ludovic Courtès 2015-08-19lint: Add 'formatting' checker....Ludovic Courtès 2015-04-13lint: Add a 'derivation' checker....Ludovic Courtès 2015-04-10lint: Report patches that cannot be found....Ludovic Courtès 2015-04-10lint: Rename 'check-patches' to 'check-patch-file-names'....Ludovic Courtès 2015-03-31tests: Fix module name for 'lint'....Ludovic Courtès 2015-03-05lint: Add tests for the 'source' checker....Ludovic Courtès 2015-03-05tests: Fix import....Ludovic Courtès 2015-01-13tests: Properly synchronize threads in the 'home-page' lint tests....Ludovic Courtès 2015-01-07tests: Add missing copyright line....Ludovic Courtès 2014-12-29tests: Make the 'lint' tests slightly more concise....Ludovic Courtès 2014-12-29tests: Factorize the 'dummy-package' macro....Ludovic Courtès 2014-12-29lint: Add tests for the 'home-page' checker....Ludovic Courtès