diff options
| author | Cyril Roelandt <tipecaml@gmail.com> | 2014-09-27 23:00:44 +0200 |
|---|---|---|
| committer | Cyril Roelandt <tipecaml@gmail.com> | 2014-10-08 03:08:19 +0200 |
| commit | 8202a513138d7b7f57878bf8f50b928e2d4094c5 (patch) | |
| tree | 94618d35b531ca3baafc58edd223f614651b6b1c /tests | |
| parent | 5622953de1125497b2e20cf25a1f9686c8bcfd77 (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.scm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/lint.scm b/tests/lint.scm index e0829089b4c..ceb7abe23e1 100644 --- a/tests/lint.scm +++ b/tests/lint.scm | |||
| @@ -44,6 +44,24 @@ | |||
| 44 | (thunk)) | 44 | (thunk)) |
| 45 | (get-output-string port))) | 45 | (get-output-string port))) |
| 46 | 46 | ||
| 47 | (test-assert "description: does not start with an upper-case letter" | ||
| 48 | (->bool | ||
| 49 | (string-contains (call-with-warnings | ||
| 50 | (lambda () | ||
| 51 | (let ((pkg (dummy-package "x" | ||
| 52 | (description "bad description.")))) | ||
| 53 | (check-description-style pkg)))) | ||
| 54 | "description should start with an upper-case letter"))) | ||
| 55 | |||
| 56 | (test-assert "synopsis: does not start with an upper-case letter" | ||
| 57 | (->bool | ||
| 58 | (string-contains (call-with-warnings | ||
| 59 | (lambda () | ||
| 60 | (let ((pkg (dummy-package "x" | ||
| 61 | (synopsis "bad synopsis.")))) | ||
| 62 | (check-synopsis-style pkg)))) | ||
| 63 | "synopsis should start with an upper-case letter"))) | ||
| 64 | |||
| 47 | (test-assert "synopsis: ends with a period" | 65 | (test-assert "synopsis: ends with a period" |
| 48 | (->bool | 66 | (->bool |
| 49 | (string-contains (call-with-warnings | 67 | (string-contains (call-with-warnings |
