diff options
author | Marius Bakke <marius@gnu.org> | 2022-06-27 19:23:48 +0200 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2022-06-27 19:23:48 +0200 |
commit | 2a7648774f1bba5bb443c00b8ab1a2ab75b7416f (patch) | |
tree | 3e081532d1d4f83706b62b499f655ea3ed836e5b /tests/services | |
parent | 43519035f954b3dc41ac50a9a877fd802b864fdb (diff) | |
parent | 0bd1c4fbbc8a438876d6efa4feb275de461a2484 (diff) | |
download | guix-2a7648774f1bba5bb443c00b8ab1a2ab75b7416f.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/services')
-rw-r--r-- | tests/services/configuration.scm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/services/configuration.scm b/tests/services/configuration.scm index 334a1e409b..6268525317 100644 --- a/tests/services/configuration.scm +++ b/tests/services/configuration.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz> +;;; Copyright © 2022 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,6 +20,7 @@ (define-module (tests services configuration) #:use-module (gnu services configuration) + #:use-module (guix diagnostics) #:use-module (guix gexp) #:use-module (srfi srfi-34) #:use-module (srfi srfi-64)) @@ -43,6 +45,17 @@ 80 (port-configuration-port (port-configuration))) +(test-equal "wrong type for a field" + '("configuration.scm" 57 11) ;error location + (guard (c ((configuration-error? c) + (let ((loc (error-location c))) + (list (basename (location-file loc)) + (location-line loc) + (location-column loc))))) + (port-configuration + ;; This is line 56; the test relies on line/column numbers! + (port "This is not a number!")))) + (define-configuration port-configuration-cs (port (number 80) "The port number." empty-serializer)) |