diff options
author | Cyril Roelandt <tipecaml@gmail.com> | 2014-09-27 23:04:46 +0200 |
---|---|---|
committer | Cyril Roelandt <tipecaml@gmail.com> | 2014-10-08 03:08:19 +0200 |
commit | a00ffdaa17c7ac96bb86734bac08a90c7785c98a (patch) | |
tree | 2515a78e269d8726329619302a336f995bbaa8d1 /tests | |
parent | 8202a513138d7b7f57878bf8f50b928e2d4094c5 (diff) | |
download | guix-a00ffdaa17c7ac96bb86734bac08a90c7785c98a.tar.gz |
guix lint: Make sure a synopsis cannot start with a lower-case article.
* guix/scripts/lint.scm (check-start-article): use "string-ci=?" instead of "string=?". * tests/lint.scm ("synopsis: starts with 'a'", "synopsis: starts with 'an'"): New tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lint.scm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/lint.scm b/tests/lint.scm index ceb7abe23e..c439faa30e 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -97,6 +97,24 @@ (check-synopsis-style pkg)))) "no article allowed at the beginning of the synopsis"))) +(test-assert "synopsis: starts with 'a'" + (->bool + (string-contains (call-with-warnings + (lambda () + (let ((pkg (dummy-package "x" + (synopsis "a bad synopsis")))) + (check-synopsis-style pkg)))) + "no article allowed at the beginning of the synopsis"))) + +(test-assert "synopsis: starts with 'an'" + (->bool + (string-contains (call-with-warnings + (lambda () + (let ((pkg (dummy-package "x" + (synopsis "an awful synopsis")))) + (check-synopsis-style pkg)))) + "no article allowed at the beginning of the synopsis"))) + (test-assert "synopsis: too long" (->bool (string-contains (call-with-warnings |