From 771eb721572b7169fe901b9a573c4bb099bee1b1 Mon Sep 17 00:00:00 2001 From: ueno Date: Wed, 8 Dec 2004 09:19:19 +0000 Subject: [PATCH] * test/test-riece-log.el (test-riece-log-display-message-function): New test case. --- lisp/ChangeLog | 5 +++++ lisp/test/test-riece-log.el | 43 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 514c637..7aa055e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2004-12-08 Daiki Ueno + * test/test-riece-log.el + (test-riece-log-display-message-function): New test case. + +2004-12-08 Daiki Ueno + * riece-log.el (riece-log-flashback): Fixed custom spec. (riece-log-date-face): New face. (riece-log-insert): Don't append date string to the end of log diff --git a/lisp/test/test-riece-log.el b/lisp/test/test-riece-log.el index b432b09..2dcd04d 100644 --- a/lisp/test/test-riece-log.el +++ b/lisp/test/test-riece-log.el @@ -32,9 +32,8 @@ (luna-define-method lunit-test-case-teardown ((case test-riece-log)) (test-riece-log-delete-directory riece-log-directory)) -(luna-define-method test-riece-log-flashback-1 ((case test-riece-log)) - (let ((riece-log-flashback 3) - riece-log-directory-map) +(luna-define-method test-riece-log-insert-1 ((case test-riece-log)) + (let (riece-log-directory-map) (lunit-assert-2 case (equal @@ -42,17 +41,16 @@ "03:14 a b c (2038/01/19)\n" "03:15 a b c (2038/01/19)\n") (with-temp-buffer - (riece-log-flashback (riece-make-identity "#riece" "")) + (riece-log-insert (riece-make-identity "#riece" "") 3) (buffer-string)))))) -(luna-define-method test-riece-log-flashback-2 ((case test-riece-log)) - (let ((riece-log-flashback t) - riece-log-directory-map) +(luna-define-method test-riece-log-insert-2 ((case test-riece-log)) + (let (riece-log-directory-map) (lunit-assert-2 case (equal "" (with-temp-buffer - (riece-log-flashback (riece-make-identity "#riece" "")) + (riece-log-insert (riece-make-identity "#riece" "") t) (buffer-string)))))) (luna-define-method test-riece-log-encode-file-name ((case test-riece-log)) @@ -124,3 +122,32 @@ (make-char 'japanese-jisx0208 36 57)) (riece-log-decode-file-name "=23=1B=24B=24j=21=3C=249=1B=28B"))))) + +(luna-define-method test-riece-log-display-message-function + ((case test-riece-log)) + (let ((riece-log-file-name-coding-system 'euc-jp) + (riece-log-enabled t) + riece-log-directory-map + (riece-server-process-alist + (list (cons "" (start-process "" (current-buffer) "sleep" "10"))))) + (riece-log-display-message-function + (riece-make-message + (riece-make-identity "ueno" "") + (riece-make-identity (format "#%c%c%c" + (make-char 'japanese-jisx0208 36 106) + (make-char 'japanese-jisx0208 33 60) + (make-char 'japanese-jisx0208 36 57)) + "") + "a b c\n" nil t))) + (let (file-name-coding-system) + (lunit-assert-2 + case + (file-directory-p + (expand-file-name + (encode-coding-string + (format "=23%c%c%c" + (make-char 'japanese-jisx0208 36 106) + (make-char 'japanese-jisx0208 33 60) + (make-char 'japanese-jisx0208 36 57)) + 'euc-jp) + riece-log-directory))))) -- 1.7.10.4