summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCyril Roelandt <tipecaml@gmail.com>2014-09-27 23:00:44 +0200
committerCyril Roelandt <tipecaml@gmail.com>2014-10-08 03:08:19 +0200
commit8202a513138d7b7f57878bf8f50b928e2d4094c5 (patch)
tree94618d35b531ca3baafc58edd223f614651b6b1c /tests
parent5622953de1125497b2e20cf25a1f9686c8bcfd77 (diff)
guix lint: check whether descriptions and synopses start with an upper-case letter.
* guix/scripts/lint.scm (check-description-style, check-synopsis-start-upper-case): New methods. * tests/lint.scm ("description: does not start with an upper-case letter", "synopsis: does not start with an upper-case letter"): New tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/lint.scm18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/lint.scm b/tests/lint.scm
index e0829089b4..ceb7abe23e 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -44,6 +44,24 @@
(thunk))
(get-output-string port)))
+(test-assert "description: does not start with an upper-case letter"
+ (->bool
+ (string-contains (call-with-warnings
+ (lambda ()
+ (let ((pkg (dummy-package "x"
+ (description "bad description."))))
+ (check-description-style pkg))))
+ "description should start with an upper-case letter")))
+
+(test-assert "synopsis: does not start with an upper-case letter"
+ (->bool
+ (string-contains (call-with-warnings
+ (lambda ()
+ (let ((pkg (dummy-package "x"
+ (synopsis "bad synopsis."))))
+ (check-synopsis-style pkg))))
+ "synopsis should start with an upper-case letter")))
+
(test-assert "synopsis: ends with a period"
(->bool
(string-contains (call-with-warnings