diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2014-11-07 14:09:19 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2014-11-07 17:52:11 +0100 |
| commit | 17854ef91dd6b8e8956ef38bd7a7db59fb43f114 (patch) | |
| tree | 9651a321f9d66153e8a55746e951765e8ba68f62 /tests | |
| parent | 72b030c0495837191ea360e71fd6c786ec063edc (diff) | |
lint: Improve check for synopses starting with package name.
* guix/scripts/lint.scm (package-name-regexp): New procedure.
(check-synopsis-style)[check-start-with-package-name]: Use it instead
of 'string-prefix-ci?'.
* tests/lint.scm ("synopsis: start with package name prefix"): New test.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/lint.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lint.scm b/tests/lint.scm index 2f62adc39f3..9a043c4b59a 100644 --- a/tests/lint.scm +++ b/tests/lint.scm | |||
| @@ -194,6 +194,14 @@ | |||
| 194 | (check-synopsis-style pkg)))) | 194 | (check-synopsis-style pkg)))) |
| 195 | "synopsis should not start with the package name"))) | 195 | "synopsis should not start with the package name"))) |
| 196 | 196 | ||
| 197 | (test-assert "synopsis: start with package name prefix" | ||
| 198 | (string-null? | ||
| 199 | (call-with-warnings | ||
| 200 | (lambda () | ||
| 201 | (let ((pkg (dummy-package "arb" | ||
| 202 | (synopsis "Arbitrary precision")))) | ||
| 203 | (check-synopsis-style pkg)))))) | ||
| 204 | |||
| 197 | (test-assert "inputs: pkg-config is probably a native input" | 205 | (test-assert "inputs: pkg-config is probably a native input" |
| 198 | (->bool | 206 | (->bool |
| 199 | (string-contains | 207 | (string-contains |
