[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/06: tests: lint: Add origin patch file name test cases.
From: |
guix-commits |
Subject: |
06/06: tests: lint: Add origin patch file name test cases. |
Date: |
Mon, 7 Dec 2020 06:49:54 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit d8ae7852057d5c1818c9c8bb77e8c41407a0d985
Author: Chris Marusich <cmmarusich@gmail.com>
AuthorDate: Sat Jun 13 22:09:46 2020 -0700
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
21887021b9acf60157b1b0a39c16f2ec6498021b.
* 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>
---
tests/lint.scm | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/tests/lint.scm b/tests/lint.scm
index 9b23081..7c24611 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)
- branch master updated (27cf238 -> d8ae785), guix-commits, 2020/12/07
- 02/06: profiles: Remove duplicates in manifest transactions., guix-commits, 2020/12/07
- 04/06: services: hurd-vm: Avoid circular dependency with (gnu system images hurd)., guix-commits, 2020/12/07
- 05/06: services: openssh: Warn about 'password-authentication?' default., guix-commits, 2020/12/07
- 01/06: doc: Fix incorrect GUIX_PROFILE value for 'guix pull'., guix-commits, 2020/12/07
- 03/06: profiles: Delete duplicate manifest entries in packages->manifest., guix-commits, 2020/12/07
- 06/06: tests: lint: Add origin patch file name test cases.,
guix-commits <=