APPROVE COMMIT 21.5 RECOMMEND 21.4
Vin -- consider this for 21.4. I haven't tested in 21.4, will do so
on request. Should work, though. The bug it's testing for was never
in 21.4, but considering the delicacy of revert-buffer, it's
imaginable that a regression could occur.
This test fails on XEmacs 21.5 before Aidan's patch of yesterday,
passes post patch. So I'm pretty sure the bug Ville and I reported is
fixed. Thanks Aidan!
Index: tests/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/tests/ChangeLog,v
retrieving revision 1.93
diff -u -r1.93 ChangeLog
--- tests/ChangeLog 21 Jun 2007 13:39:32 -0000 1.93
+++ tests/ChangeLog 22 Jun 2007 16:31:15 -0000
@@ -0,0 +1,4 @@
+2007-06-22 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * automated/mule-tests.el (buffer-modified-p): Test after revert.
+
Index: tests/automated/mule-tests.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/tests/automated/mule-tests.el,v
retrieving revision 1.18
diff -u -r1.18 mule-tests.el
--- tests/automated/mule-tests.el 21 May 2007 08:11:37 -0000 1.18
+++ tests/automated/mule-tests.el 22 Jun 2007 16:31:15 -0000
@@ -112,6 +112,35 @@
;; ochars[3] = 0x80 | input & ~(0xFFFFFFC0);
(logior #x80 (logand code-point #x3f))))))))
+;;----------------------------------------------------------------
+;; Test that revert-buffer resets the modiff
+;; Bug reported 2007-06-20 <200706201902.32191.scop(a)xemacs.org>.
+;; Fixed 2007-06-22 <18043.2793.611745.734215(a)parhasard.net>.
+;;----------------------------------------------------------------
+
+;; #### need a temp file name but this will do for now
+(let ((test-file-name (expand-file-name "~/test-revert-buffer-resets-modiff"))
+ revert-buffer-function
+ kill-buffer-hook) ; paranoia
+ (find-file test-file-name)
+ (erase-buffer)
+ (insert "a string\n")
+ (save-buffer 0)
+ (insert "more text\n")
+ (revert-buffer t t)
+ ;; Just "find-file" with autodetect coding didn't fail for me, but it
does
+ ;; fail under test harness. Still we'll redo the test with an explicit
+ ;; coding system just in case.
+ (Assert (not (buffer-modified-p)))
+ (kill-buffer nil)
+ (when (find-coding-system 'utf-8)
+ (find-file test-file-name 'utf-8)
+ (insert "more text\n")
+ (revert-buffer t t)
+ (Assert (not (buffer-modified-p)))
+ (kill-buffer nil))
+ (delete-file test-file-name))
+
;;-----------------------------------------------------------------
;; Test string modification functions that modify the length of a char.
;;-----------------------------------------------------------------
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches