summaryrefslogtreecommitdiff
path: root/tests/lint.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2019-08-22 15:53:27 -0400
committerMark H Weaver <mhw@netris.org>2019-08-22 15:53:27 -0400
commit893c2df00daa4e6dd6a7ff3813d7df5329877f9e (patch)
treeacd0db459464acae47083b66d5ce12cc656e2f10 /tests/lint.scm
parent04b9b7bb05aff4c41f46cd79aa7bc953ace16e86 (diff)
parent0ccc9a0f5bb89b239d56157ea66f8420fcec5ba6 (diff)
downloadpatches-893c2df00daa4e6dd6a7ff3813d7df5329877f9e.tar
patches-893c2df00daa4e6dd6a7ff3813d7df5329877f9e.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/lint.scm')
-rw-r--r--tests/lint.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/lint.scm b/tests/lint.scm
index 8a9023a7a3..db6dd6dbe1 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -74,6 +74,12 @@
(((and (? lint-warning?) warning))
(lint-warning-message warning))))
+(define (warning-contains? str warnings)
+ "Return true if WARNINGS is a singleton with a warning that contains STR."
+ (match warnings
+ (((? lint-warning? warning))
+ (string-contains (lint-warning-message warning) str))))
+
(test-begin "lint")
@@ -366,13 +372,11 @@
(single-lint-warning-message
(check-home-page pkg))))
-(test-equal "home-page: host not found"
- "URI http://does-not-exist domain not found: Name or service not known"
+(test-assert "home-page: host not found"
(let ((pkg (package
(inherit (dummy-package "x"))
(home-page "http://does-not-exist"))))
- (single-lint-warning-message
- (check-home-page pkg))))
+ (warning-contains? "domain not found" (check-home-page pkg))))
(test-skip (if (http-server-can-listen?) 0 1))
(test-equal "home-page: Connection refused"