From 3c005ded28e308c3d0f63e53ffd747bdf1ec3102 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 16 Oct 2020 12:55:35 -0700 Subject: [PATCH] Remove the .el suffix from all module use MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I don’t think there’s anywhere where the module file name is used in this particular situation. That’s all done by Make. --- generate.el | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/generate.el b/generate.el index f6756f9..a2f1121 100644 --- a/generate.el +++ b/generate.el @@ -25,18 +25,10 @@ ("script" . ,(format "make integration-test-%s TEST_ARCHIVE=$(realpath bin/)" module)))) (defun unit-test-exists-p (module) - (file-exists-p - (format "test/%s-test.el" (string-remove-suffix ".el" module)))) + (file-exists-p (format "test/%s-test.el" module))) (defun integration-test-exists-p (module) - (file-exists-p - (format "test/integration/%s.bats" (string-remove-suffix ".el" module)))) - -(defun alist-p (lst) - (and (listp lst) - (listp (car lst)) - (= (length lst) 2) - (not (proper-list-p (car lst))))) + (file-exists-p (format "test/integration/%s.bats"))) (defun prepare-value-for-yaml (object) (pcase object @@ -55,7 +47,9 @@ hash)) (defun generate () - (let* ((modules (directory-files "." nil (rx string-start "oni-"))) + (let* ((modules + (mapcar (lambda (file) (string-remove-suffix ".el" file)) + (directory-files "." nil (rx string-start "oni-")))) (directories (cl-remove-if-not #'file-directory-p modules))) (with-temp-buffer (insert