aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/lint.scm33
1 files changed, 32 insertions, 1 deletions
diff --git a/tests/lint.scm b/tests/lint.scm
index 9b230814a5..7c24611934 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -315,7 +315,7 @@
`(("python-setuptools" ,python-setuptools))))))
(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"
(single-lint-warning-message
(let ((pkg (dummy-package "x"
@@ -324,6 +324,37 @@
(patches (list "/path/to/y.patch")))))))
(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"
(string-append "x-"
(make-string 100 #\a)