mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
tests: lint: Add origin patch file name test cases.
In particular, "<origin> patches: same file name -> no warnings" would
have caught the issue which was fixed in commit
21887021b9
.
* tests/lint.scm (patches: file names): Rename this test case...
("file patches: different file name -> warning"): ... to this.
("file patches: same file name -> no warnings")
("<origin> patches: different file name -> warning")
("<origin> patches: same file name -> no warnings"): New test cases.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
aecd2a13cb
commit
d8ae785205
1 changed files with 32 additions and 1 deletions
|
@ -315,7 +315,7 @@ (define (warning-contains? str warnings)
|
||||||
`(("python-setuptools" ,python-setuptools))))))
|
`(("python-setuptools" ,python-setuptools))))))
|
||||||
(check-inputs-should-not-be-an-input-at-all pkg))))
|
(check-inputs-should-not-be-an-input-at-all pkg))))
|
||||||
|
|
||||||
(test-equal "patches: file names"
|
(test-equal "file patches: different file name -> warning"
|
||||||
"file names of patches should start with the package name"
|
"file names of patches should start with the package name"
|
||||||
(single-lint-warning-message
|
(single-lint-warning-message
|
||||||
(let ((pkg (dummy-package "x"
|
(let ((pkg (dummy-package "x"
|
||||||
|
@ -324,6 +324,37 @@ (define (warning-contains? str warnings)
|
||||||
(patches (list "/path/to/y.patch")))))))
|
(patches (list "/path/to/y.patch")))))))
|
||||||
(check-patch-file-names pkg))))
|
(check-patch-file-names pkg))))
|
||||||
|
|
||||||
|
(test-equal "file patches: same file name -> no warnings"
|
||||||
|
'()
|
||||||
|
(let ((pkg (dummy-package "x"
|
||||||
|
(source
|
||||||
|
(dummy-origin
|
||||||
|
(patches (list "/path/to/x.patch")))))))
|
||||||
|
(check-patch-file-names pkg)))
|
||||||
|
|
||||||
|
(test-equal "<origin> patches: different file name -> warning"
|
||||||
|
"file names of patches should start with the package name"
|
||||||
|
(single-lint-warning-message
|
||||||
|
(let ((pkg (dummy-package "x"
|
||||||
|
(source
|
||||||
|
(dummy-origin
|
||||||
|
(patches
|
||||||
|
(list
|
||||||
|
(dummy-origin
|
||||||
|
(file-name "y.patch")))))))))
|
||||||
|
(check-patch-file-names pkg))))
|
||||||
|
|
||||||
|
(test-equal "<origin> patches: same file name -> no warnings"
|
||||||
|
'()
|
||||||
|
(let ((pkg (dummy-package "x"
|
||||||
|
(source
|
||||||
|
(dummy-origin
|
||||||
|
(patches
|
||||||
|
(list
|
||||||
|
(dummy-origin
|
||||||
|
(file-name "x.patch")))))))))
|
||||||
|
(check-patch-file-names pkg)))
|
||||||
|
|
||||||
(test-equal "patches: file name too long"
|
(test-equal "patches: file name too long"
|
||||||
(string-append "x-"
|
(string-append "x-"
|
||||||
(make-string 100 #\a)
|
(make-string 100 #\a)
|
||||||
|
|
Loading…
Reference in a new issue