* check-base64.el: New file.
* check-modules.el: Ditto.
* test-env.el (test-base64-encode-string-has-no-line-break-argument,
test-base64-encode-region-has-no-line-break-argument): New functions.
(test-base64-encode-4, test-base64-encode-5): Use them.
* WL-MK (test-wl): Renamed from check-wl.
(check-wl): New function.
* Makefile (check): Don't use `-q -no-site-file'.
(BATCHFLAG): New variable.
(check): Use it.
(test): New rule.
+2001-08-30 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * WL-MK (test-wl): Renamed from check-wl.
+ (check-wl): New function.
+
+ * Makefile (check): Don't use `-q -no-site-file'.
+ (BATCHFLAG): New variable.
+ (check): Use it.
+ (test): New rule.
+
2001-08-29 Yuuichi Teranishi <teranisi@gohome.org>
* WL-ELS (WL-MODULES): Added wl-acap.
################# No need to modify following lines ####################
-FLAGS = -batch -q -no-site-file
+BATCHFLAG = -batch
+FLAGS = $(BATCHFLAG) -q -no-site-file
elc:
$(EMACS) $(FLAGS) -l WL-MK -f compile-wl-package $(LISPDIR) $(PIXMAPDIR)
check:
- $(EMACS) $(FLAGS) -l WL-MK -f check-wl $(LISPDIR) $(PIXMAPDIR)
+ $(EMACS) $(BATCHFLAG) -l WL-MK -f check-wl $(LISPDIR) $(PIXMAPDIR)
+
+test:
+ $(EMACS) $(FLAGS) -l WL-MK -f test-wl $(LISPDIR) $(PIXMAPDIR)
install-elc:
$(EMACS) $(FLAGS) -l WL-MK -f install-wl-package $(LISPDIR) $(PIXMAPDIR)
(config-wl-pixmap-dir)
(princ "\n"))
-(defun check-wl ()
+(defun test-wl ()
(config-wl-package)
(require 'lunit)
(let ((files (directory-files "tests" t "^test-.*\\.el$"))
(setq files (cdr files)))
(lunit suite)))
+(defun check-wl ()
+ (config-wl-package)
+ (require 'lunit)
+ (let ((files (directory-files "tests" t "^check-.*\\.el$"))
+ (suite (lunit-make-test-suite)))
+ (while files
+ (if (file-regular-p (car files))
+ (progn
+ (load-file (car files))
+ (lunit-test-suite-add-test
+ suite (lunit-make-test-suite-from-class
+ (intern (file-name-sans-extension
+ (file-name-nondirectory (car files))))))))
+ (setq files (cdr files)))
+ (lunit suite)))
+
(defun wl-scan-source (path)
(let (ret)
(mapcar
+2001-08-30 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * test-env.el: Removed (Separated to check-*.el).
+
+ * check-base64.el: New file.
+
+ * check-modules.el: Ditto.
+
+ * test-env.el (test-base64-encode-string-has-no-line-break-argument,
+ test-base64-encode-region-has-no-line-break-argument): New functions.
+ (test-base64-encode-4, test-base64-encode-5): Use them.
+
2001-08-29 Yuuichi Teranishi <teranisi@gohome.org>
* test-env.el (test-base64-encode-4, test-base64-encode-5):
--- /dev/null
+(require 'lunit)
+(require 'wl)
+
+(luna-define-class check-base64 (lunit-test-case))
+
+;; mel-b-ccl on XEmacs 21.1
+;; <http://lists.airs.net/wl/archive/200101/msg00075.html>
+(luna-define-method check-base64-encode-1 ((case check-base64))
+ (require 'elmo-util)
+ (lunit-assert
+ (string=
+ "QQ=="
+ (elmo-base64-encode-string "A"))))
+
+(luna-define-method check-base64-encode-2 ((case check-base64))
+ (require 'elmo-util)
+ (lunit-assert
+ (string=
+ "QUE="
+ (elmo-base64-encode-string "AA"))))
+
+(luna-define-method check-base64-encode-3 ((case check-base64))
+ (require 'elmo-util)
+ (lunit-assert
+ (string=
+ "QUFB"
+ (elmo-base64-encode-string "AAA"))))
+
+;; Old base64 module on XEmacs 21.1
+;; <http://lists.airs.net/wl/archive/200104/msg00150.html>
+(defun check-base64-encode-string-has-no-line-break-argument ()
+ (require 'elmo-util)
+ (condition-case nil
+ (elmo-base64-encode-string "" t)
+ (wrong-number-of-arguments)))
+
+(luna-define-method check-base64-encode-4 ((case check-base64))
+ (lunit-assert
+ (check-base64-encode-string-has-no-line-break-argument)))
+
+;; <http://lists.airs.net/wl/archive/200107/msg00121.html>
+
+(defun check-base64-encode-region-has-no-line-break-argument ()
+ (require 'mel)
+ (condition-case nil
+ (with-temp-buffer
+ (funcall (mel-find-function 'mime-encode-region "base64")
+ (point-min) (point-max) t)
+ t)
+ (wrong-number-of-arguments)))
+
+(luna-define-method check-base64-encode-5 ((case check-base64))
+ (lunit-assert
+ (check-base64-encode-region-has-no-line-break-argument)))
+
--- /dev/null
+(require 'lunit)
+(require 'wl)
+
+(luna-define-class check-modules (lunit-test-case))
+
+;;;
+;;; environment test for user (not for developer)
+;;;
+
+;; APEL
+(luna-define-method check-modules-apel-version ((case check-modules))
+ (require 'apel-ver)
+ (lunit-assert
+ (product-version>= (product-find 'apel-ver) '(10 2))))
+++ /dev/null
-(require 'lunit)
-(require 'wl)
-
-(luna-define-class test-env (lunit-test-case))
-
-;;;
-;;; environment test for user (not for developer)
-;;;
-
-;; APEL
-(luna-define-method test-apel-version ((case test-env))
- (require 'apel-ver)
- (lunit-assert
- (product-version>= (product-find 'apel-ver) '(10 2))))
-
-
-;; mel-b-ccl on XEmacs 21.1
-;; <http://lists.airs.net/wl/archive/200101/msg00075.html>
-(luna-define-method test-base64-encode-1 ((case test-env))
- (require 'elmo-util)
- (lunit-assert
- (string=
- "QQ=="
- (elmo-base64-encode-string "A"))))
-
-(luna-define-method test-base64-encode-2 ((case test-env))
- (require 'elmo-util)
- (lunit-assert
- (string=
- "QUE="
- (elmo-base64-encode-string "AA"))))
-
-(luna-define-method test-base64-encode-3 ((case test-env))
- (require 'elmo-util)
- (lunit-assert
- (string=
- "QUFB"
- (elmo-base64-encode-string "AAA"))))
-
-;; Old base64 module on XEmacs 21.1
-;; <http://lists.airs.net/wl/archive/200104/msg00150.html>
-(luna-define-method test-base64-encode-4 ((case test-env))
- (require 'elmo-util)
- (lunit-assert
- (condition-case nil
- (elmo-base64-encode-string "" t)
- (wrong-number-of-arguments))))
-
-;; <http://lists.airs.net/wl/archive/200107/msg00121.html>
-(luna-define-method test-base64-encode-5 ((case test-env))
- (require 'mel)
- (lunit-assert
- (condition-case nil
- (with-temp-buffer
- (funcall (mel-find-function 'mime-encode-region "base64")
- (point-min) (point-max) t)
- t)
- (wrong-number-of-arguments))))