aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2017-03-27 21:19:38 -0400
committerLeo Famulari <leo@famulari.name>2017-03-27 21:19:38 -0400
commitc17383f400d3b942c22ec46b556cad8ca3a2fce1 (patch)
treef430fdc7b6e41a652b4a0dbdd08050f586e4b24d /tests
parentb1a8fd2d2cf6bf1b20ba8d26ca6f9a7caef60cbc (diff)
parent7aeb4ffa5828206f89ec62226863c27f7c1c028d (diff)
downloadguix-c17383f400d3b942c22ec46b556cad8ca3a2fce1.tar
guix-c17383f400d3b942c22ec46b556cad8ca3a2fce1.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'tests')
-rw-r--r--tests/lint.scm8
-rw-r--r--tests/union.scm22
2 files changed, 29 insertions, 1 deletions
diff --git a/tests/lint.scm b/tests/lint.scm
index 3a9b89fe95..7610a91fd3 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2017 Alex Kost <alezost@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -167,6 +168,13 @@
(check-synopsis-style pkg)))
"synopsis should not be empty")))
+(test-assert "synopsis: valid Texinfo markup"
+ (->bool
+ (string-contains
+ (with-warnings
+ (check-synopsis-style (dummy-package "x" (synopsis "Bad $@ texinfo"))))
+ "Texinfo markup in synopsis is invalid")))
+
(test-assert "synopsis: does not start with an upper-case letter"
(->bool
(string-contains (with-warnings
diff --git a/tests/union.scm b/tests/union.scm
index cccf397181..b63edc757b 100644
--- a/tests/union.scm
+++ b/tests/union.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -124,4 +124,24 @@
;; new 'bin' sub-directory in the profile.
(eq? 'directory (stat:type (lstat "bin"))))))))
+(test-assert "union-build #:create-all-directories? #t"
+ (let* ((build `(begin
+ (use-modules (guix build union))
+ (union-build (assoc-ref %outputs "out")
+ (map cdr %build-inputs)
+ #:create-all-directories? #t)))
+ (input (package-derivation %store %bootstrap-guile))
+ (drv (build-expression->derivation %store "union-test-all-dirs"
+ build
+ #:modules '((guix build union))
+ #:inputs `(("g" ,input)))))
+ (and (build-derivations %store (list drv))
+ (with-directory-excursion (derivation->output-path drv)
+ ;; Even though there's only one input to the union,
+ ;; #:create-all-directories? #t must have created bin/ rather than
+ ;; making it a symlink to Guile's bin/.
+ (and (file-exists? "bin/guile")
+ (file-is-directory? "bin")
+ (eq? 'symlink (stat:type (lstat "bin/guile"))))))))
+
(test-end)