From 13ea09ab66b44b1a3b0971e1a24ce0da47a6ca0a Mon Sep 17 00:00:00 2001 From: kaoru Date: Tue, 31 Aug 2010 12:33:11 +0000 Subject: [PATCH] * test-dist.el (test-elmo-modules-trailing-whitespace) (test-util-modules-trailing-whitespace) (test-wl-modules-trailing-whitespace): New testcases. --- tests/ChangeLog | 6 ++++++ tests/test-dist.el | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/tests/ChangeLog b/tests/ChangeLog index e2999bd..f6adbaf 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,9 @@ +2010-08-31 TAKAHASHI Kaoru + + * test-dist.el (test-elmo-modules-trailing-whitespace) + (test-util-modules-trailing-whitespace) + (test-wl-modules-trailing-whitespace): New testcases. + 2010-01-22 TAKAHASHI Kaoru * test-utf7.el (test-utf7-encode-string-alpha): Fix indent. diff --git a/tests/test-dist.el b/tests/test-dist.el index 432500e..aabfd03 100644 --- a/tests/test-dist.el +++ b/tests/test-dist.el @@ -17,6 +17,21 @@ WL-MODULES) lost)))) +(luna-define-method test-wl-modules-trailing-whitespace ((case test-dist)) + (let (filename badmodule) + (mapc + (lambda (module) + (setq filename + (format "%s.el%s" (symbol-name module) + (if (eq 'wl-news module) ".in" ""))) + (with-temp-buffer + (insert-file-contents (expand-file-name filename WLDIR)) + (when (re-search-forward "[ \t]$" nil t) + (add-to-list 'badmodule filename)))) + WL-MODULES) + (lunit-assert (null badmodule)))) + + ;; ELMO-MODULES (luna-define-method test-elmo-modules-exists ((case test-dist)) (lunit-assert @@ -30,6 +45,19 @@ ELMO-MODULES) lost)))) +(luna-define-method test-elmo-modules-trailing-whitespace ((case test-dist)) + (let (filename badmodule) + (mapc + (lambda (module) + (setq filename (format "%s.el" (symbol-name module))) + (with-temp-buffer + (insert-file-contents (expand-file-name filename ELMODIR)) + (when (re-search-forward "[ \t]$" nil t) + (add-to-list 'badmodule filename)))) + ELMO-MODULES) + (lunit-assert (null badmodule)))) + + ;; UTILS-MODULES (luna-define-method test-util-modules-exists ((case test-dist)) (lunit-assert @@ -43,6 +71,19 @@ UTILS-MODULES) lost)))) +(luna-define-method test-util-modules-trailing-whitespace ((case test-dist)) + (let (filename badmodule) + (mapc + (lambda (module) + (setq filename (format "%s.el" (symbol-name module))) + (with-temp-buffer + (insert-file-contents (expand-file-name filename UTILSDIR)) + (when (re-search-forward "[ \t]$" nil t) + (add-to-list 'badmodule filename)))) + UTILS-MODULES) + (lunit-assert (null badmodule)))) + + ;; Icons (luna-define-method test-wl-icon-exists ((case test-dist)) (lunit-assert -- 1.7.10.4