From d8127a386c4474543c17d0641ed0fd2f1b21f97b Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Tue, 27 Mar 2018 02:03:40 +0200 Subject: utils: Check 'show-version' and 'show-package-information' * tests/utils.scm ("show-package-information") ("show-version"): New tests. --- tests/utils.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests/utils.scm') diff --git a/tests/utils.scm b/tests/utils.scm index fbd32e1..0625850 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -19,6 +19,7 @@ (use-modules (ice-9 match) (ice-9 rdelim) (srfi srfi-64) + (mcron config) (mcron utils)) (test-begin "utils") @@ -63,6 +64,23 @@ (with-output-to-string (λ () (mcron-error 0 "foo" "bar")))) +;;; +;;; Check user interface conformance to GNU Coding Standards +;;; + +(test-assert "show-version" + (let ((out (with-output-to-string (λ () (show-version "dummy"))))) + (and (string-contains out config-package-version) + (string-contains out config-package-name)))) + +(test-assert "show-package-information" + (let ((out (with-output-to-string (λ () (show-package-information))))) + (string-contains out config-package-bugreport))) + +;;; +;;; Check 'get-user' +;;; + (define entry ;; Random user entry. (getpw)) -- cgit v1.2.3