From: kaoru Date: Tue, 28 Aug 2001 15:17:50 +0000 (+0000) Subject: * test-dist.el: New file. X-Git-Tag: wl-2_7_3~6 X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Fwanderlust.git;a=commitdiff_plain;h=5ca5b1e9100c29e27a73eb223484076da4f82282 * test-dist.el: New file. (test-wl-modules-exists, test-elmo-modules-exists) (test-util-modules-exists, test-wl-icon-exists) (test-version-status-icon-xpm, test-version-status-icon-xbm) (test-texi-version): New testcases. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index e69de29..564e4af 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -0,0 +1,7 @@ +2001-08-28 TAKAHASHI Kaoru + + * test-dist.el: New file. + (test-wl-modules-exists, test-elmo-modules-exists) + (test-util-modules-exists, test-wl-icon-exists) + (test-version-status-icon-xpm, test-version-status-icon-xbm) + (test-texi-version): New testcases. diff --git a/tests/test-dist.el b/tests/test-dist.el new file mode 100644 index 0000000..c26a0f8 --- /dev/null +++ b/tests/test-dist.el @@ -0,0 +1,83 @@ +(require 'lunit) +(require 'wl) +(require 'cl) ; mapc + +(luna-define-class test-dist (lunit-test-case)) + +;; WL-MODULES +(luna-define-method test-wl-modules-exists ((case test-dist)) + (lunit-assert + (null + (let (filename lost) + (mapc + (lambda (module) + (setq filename (concat (symbol-name module) ".el")) + (unless (file-exists-p (expand-file-name filename WLDIR)) + (add-to-list 'lost symbol))) + WL-MODULES) + lost)))) + +;; ELMO-MODULES +(luna-define-method test-elmo-modules-exists ((case test-dist)) + (lunit-assert + (null + (let (filename lost) + (mapc + (lambda (module) + (setq filename (concat (symbol-name module) ".el")) + (unless (file-exists-p (expand-file-name filename ELMODIR)) + (add-to-list 'lost symbol))) + ELMO-MODULES) + lost)))) + +;; UTILS-MODULES +(luna-define-method test-util-modules-exists ((case test-dist)) + (lunit-assert + (null + (let (filename lost) + (mapc + (lambda (module) + (setq filename (concat (symbol-name module) ".el")) + (unless (file-exists-p (expand-file-name filename UTILSDIR)) + (add-to-list 'lost symbol))) + UTILS-MODULES) + lost)))) + +;; Icons +(luna-define-method test-wl-icon-exists ((case test-dist)) + (lunit-assert + (null + (let (name value lost) + (mapatoms + (lambda (symbol) + (setq name (symbol-name symbol)) + (setq value (and (boundp symbol) (symbol-value symbol))) + (when (and (string-match "^wl-.*-icon$" name) + (stringp value) + (string-match "xpm$" value)) + (unless (file-exists-p (expand-file-name value ICONDIR)) + (add-to-list 'lost symbol))))) + lost)))) + +(luna-define-method test-version-status-icon-xpm ((case test-dist)) + (require 'wl-demo) + (lunit-assert + (file-exists-p + (expand-file-name (concat wl-demo-icon-name ".xpm") ICONDIR)))) + +(luna-define-method test-version-status-icon-xbm ((case test-dist)) + (require 'wl-demo) + (lunit-assert + (file-exists-p + (expand-file-name (concat wl-demo-icon-name ".xbm") ICONDIR)))) + +;; verstion.texi +(luna-define-method test-texi-version ((case test-dist)) + (require 'wl-version) + (lunit-assert + (string= + (product-version-string (product-find 'wl-version)) + (with-temp-buffer + (insert-file-contents (expand-file-name "version.texi" DOCDIR)) + (re-search-forward "^@set VERSION \\([0-9\.]+\\)$") + (match-string 1)))))