5 (luna-define-class test-dist (lunit-test-case))
8 (luna-define-method test-wl-modules-exists ((case test-dist))
14 (setq filename (concat (symbol-name module) ".el"))
15 (unless (file-exists-p (expand-file-name filename WLDIR))
16 (add-to-list 'lost filename)))
20 (luna-define-method test-wl-modules-trailing-whitespace ((case test-dist))
21 (let (filename badmodule)
25 (format "%s.el%s" (symbol-name module)
26 (if (eq 'wl-news module) ".in" "")))
28 (insert-file-contents (expand-file-name filename WLDIR))
29 (when (re-search-forward "[ \t]$" nil t)
30 (add-to-list 'badmodule filename))))
32 (lunit-assert (null badmodule))))
36 (luna-define-method test-elmo-modules-exists ((case test-dist))
42 (setq filename (concat (symbol-name module) ".el"))
43 (unless (file-exists-p (expand-file-name filename ELMODIR))
44 (add-to-list 'lost filename)))
48 (luna-define-method test-elmo-modules-trailing-whitespace ((case test-dist))
49 (let (filename badmodule)
52 (setq filename (format "%s.el" (symbol-name module)))
54 (insert-file-contents (expand-file-name filename ELMODIR))
55 (when (re-search-forward "[ \t]$" nil t)
56 (add-to-list 'badmodule filename))))
58 (lunit-assert (null badmodule))))
62 (luna-define-method test-util-modules-exists ((case test-dist))
68 (setq filename (concat (symbol-name module) ".el"))
69 (unless (file-exists-p (expand-file-name filename UTILSDIR))
70 (add-to-list 'lost symbol)))
74 (luna-define-method test-util-modules-trailing-whitespace ((case test-dist))
75 (let (filename badmodule)
78 (setq filename (format "%s.el" (symbol-name module)))
80 (insert-file-contents (expand-file-name filename UTILSDIR))
81 (when (re-search-forward "[ \t]$" nil t)
82 (add-to-list 'badmodule filename))))
84 (lunit-assert (null badmodule))))
88 (luna-define-method test-wl-icon-exists ((case test-dist))
91 (let (name value lost)
94 (setq name (symbol-name symbol))
95 (setq value (and (boundp symbol) (symbol-value symbol)))
96 (when (and (string-match "^wl-.*-icon$" name)
98 (string-match "xpm$" value))
99 (unless (file-exists-p (expand-file-name value ICONDIR))
100 (add-to-list 'lost symbol)))))
103 (luna-define-method test-version-status-icon-xpm ((case test-dist))
107 (expand-file-name (concat (wl-demo-icon-name) ".xpm") ICONDIR))))
109 (luna-define-method test-version-status-icon-xbm ((case test-dist))
113 (expand-file-name (concat (wl-demo-icon-name) ".xbm") ICONDIR))))
116 (luna-define-method test-texi-version ((case test-dist))
117 (require 'wl-version)
120 (product-version-string (product-find 'wl-version))
122 (insert-file-contents (expand-file-name "version.texi" DOCDIR))
123 (re-search-forward "^@set VERSION \\([0-9\.]+\\)$")
127 (luna-define-method test-refcard-version ((case test-dist))
128 (require 'wl-version)
131 (product-version-string (product-find 'wl-version))
133 (insert-file-contents (expand-file-name "version.tex" DOCDIR))
134 (re-search-forward "^\\\\def\\\\versionnumber{\\([0-9\.]+\\)}$")
138 (luna-define-method test-version-wl-changelog ((case test-dist))
139 (require 'wl-version)
142 (product-version-string (product-find 'wl-version))
144 (insert-file-contents (expand-file-name "ChangeLog" WLDIR))
146 "^\t\\* Version number is increased to \\([0-9\\.]+[0-9]\\).$")
150 (luna-define-method test-version-elmo-changelog ((case test-dist))
151 (require 'elmo-version)
154 (product-version-string (product-find 'elmo-version))
156 (insert-file-contents (expand-file-name "ChangeLog" ELMODIR))
158 "^\t\\* elmo-version.el (elmo-version): Up to \\([0-9\\.]+[0-9]\\).$")
161 ;; ChangeLog (toplevel)
162 (luna-define-method test-version-toplevel-changelog ((case test-dist))
163 (require 'wl-version)
164 (when (and (string= (wl-version-status) "stable")
165 ;; pre release version don't check.
168 (product-code-name (product-find 'wl-version)))))
170 (insert-file-contents (expand-file-name "ChangeLog" "./"))
172 "^\t\\* \\([0-9\\.]+\\) - \"\\([^\"]+\\)\"$")
175 (product-version-string (product-find 'wl-version))
179 (product-code-name (product-find 'wl-version))
180 (match-string 2))))))
182 ;; README, README.ja (toplevel)
183 (luna-define-method test-version-readme ((case test-dist))
184 (require 'wl-version)
185 (when (string= (wl-version-status) "stable")
189 (insert-file-contents (expand-file-name file "./"))
190 (re-search-forward "checkout -r wl-\\([0-9]+\\)_\\([0-9]+\\) wanderlust")
192 (= (string-to-number (match-string 1))
193 (nth 0 (product-version (product-find 'wl-version)))))
195 (= (string-to-number (match-string 2))
196 (nth 1 (product-version (product-find 'wl-version)))))))
197 '("README" "README.ja"))))
200 (luna-define-method test-wl-demo-copyright-notice ((case test-dist))
204 (format-time-string "%Y" (current-time))
205 wl-demo-copyright-notice)))