[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113369: * undo-tests.el (undo-test-buffer-modified,
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r113369: * undo-tests.el (undo-test-buffer-modified, undo-test-file-modified): New tests. |
Date: |
Thu, 11 Jul 2013 15:56:46 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113369
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2013-07-11 08:56:41 -0700
message:
* undo-tests.el (undo-test-buffer-modified, undo-test-file-modified): New
tests.
modified:
test/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-8588
test/automated/undo-tests.el undotests.el-20130108184711-brlnvjau5r1ardib-1
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog 2013-07-09 07:52:25 +0000
+++ b/test/ChangeLog 2013-07-11 15:56:41 +0000
@@ -1,3 +1,8 @@
+2013-07-11 Glenn Morris <address@hidden>
+
+ * automated/undo-tests.el (undo-test-buffer-modified)
+ (undo-test-file-modified): New tests.
+
2013-07-09 Michael Albinus <address@hidden>
* automated/file-notify-tests.el (file-notify-test00-availability):
=== modified file 'test/automated/undo-tests.el'
--- a/test/automated/undo-tests.el 2013-06-27 02:00:54 +0000
+++ b/test/automated/undo-tests.el 2013-07-11 15:56:41 +0000
@@ -200,6 +200,32 @@
'(error "Unrecognized entry in undo list \"bogus\""))))
(buffer-string))))))
+;; http://debbugs.gnu.org/14824
+(ert-deftest undo-test-buffer-modified ()
+ "Test undoing marks buffer unmodified."
+ (with-temp-buffer
+ (buffer-enable-undo)
+ (insert "1")
+ (undo-boundary)
+ (set-buffer-modified-p nil)
+ (insert "2")
+ (undo)
+ (should-not (buffer-modified-p))))
+
+(ert-deftest undo-test-file-modified ()
+ "Test undoing marks buffer visiting file unmodified."
+ (let ((tempfile (make-temp-file "undo-test")))
+ (unwind-protect
+ (progn
+ (with-current-buffer (find-file-noselect tempfile)
+ (insert "1")
+ (undo-boundary)
+ (set-buffer-modified-p nil)
+ (insert "2")
+ (undo)
+ (should-not (buffer-modified-p))))
+ (delete-file tempfile))))
+
(defun undo-test-all (&optional interactive)
"Run all tests for \\[undo]."
(interactive "p")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113369: * undo-tests.el (undo-test-buffer-modified, undo-test-file-modified): New tests.,
Glenn Morris <=