From 0516dffcb65f99893e9474796619c4e249aecf13 Mon Sep 17 00:00:00 2001 From: kaoru Date: Wed, 12 Dec 2001 06:43:58 +0000 Subject: [PATCH] * test-dist.el (test-codename, test-version-wl-changelog) (test-version-elmo-changelog, test-version-toplevel-changelog) : New testcases. --- tests/test-dist.el | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/tests/test-dist.el b/tests/test-dist.el index 28ef908..c9b62d4 100644 --- a/tests/test-dist.el +++ b/tests/test-dist.el @@ -92,3 +92,48 @@ (insert-file-contents (expand-file-name "wl-refcard.tex" DOCDIR)) (re-search-forward "^\\\\def\\\\versionnumber{\\([0-9\.]+\\)}$") (match-string 1))))) + +;; wl/ChangeLog +(luna-define-method test-version-wl-changelog ((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 "ChangeLog" WLDIR)) + (re-search-forward + "^\t\\* Version number is increased to \\([0-9\\.]+[0-9]\\).$") + (match-string 1))))) + +;; elmo/ChangeLog +(luna-define-method test-version-elmo-changelog ((case test-dist)) + (require 'elmo-version) + (lunit-assert + (string= + (product-version-string (product-find 'elmo-version)) + (with-temp-buffer + (insert-file-contents (expand-file-name "ChangeLog" ELMODIR)) + (re-search-forward + "^\t\\* elmo-version.el (elmo-version): Up to \\([0-9\\.]+[0-9]\\).$") + (match-string 1))))) + +;; ChangeLog (toplevel) +(luna-define-method test-version-toplevel-changelog ((case test-dist)) + (require 'wl-version) + (when (and (string= (wl-version-status) "stable") + ;; pre release version don't check. + (not (string-match + "pre" + (product-code-name (product-find 'wl-version))))) + (with-temp-buffer + (insert-file-contents (expand-file-name "ChangeLog" "./")) + (re-search-forward + "\\* \\([0-9\\.]+\\) - \"\\([^\"]+\\)\".$") + (lunit-assert + (string= + (product-version-string (product-find 'wl-version)) + (match-string 1))) + (lunit-assert + (string= + (product-code-name (product-find 'wl-version)) + (match-string 2)))))) -- 1.7.10.4