[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d397b04215: Fix buffer-tests
From: |
Eli Zaretskii |
Subject: |
master d397b04215: Fix buffer-tests |
Date: |
Thu, 7 Jul 2022 12:35:15 -0400 (EDT) |
branch: master
commit d397b0421567e4e52bccfa15dc23f4a9b8e6e9f0
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Fix buffer-tests
* test/src/buffer-tests.el (test-restore-buffer-modified-p): Don't
assume turning on auto-save-mode cannot auto-save immediately.
---
test/src/buffer-tests.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el
index 13d48b31a4..cba10a0502 100644
--- a/test/src/buffer-tests.el
+++ b/test/src/buffer-tests.el
@@ -1503,9 +1503,12 @@ with parameters from the *Messages* buffer modification."
(ert-deftest test-restore-buffer-modified-p ()
(ert-with-temp-file file
+ ;; This avoids the annoying "foo and bar are the same file" on
+ ;; MS-Windows.
+ (setq file (file-truename file))
(with-current-buffer (find-file file)
(auto-save-mode 1)
- (should-not (buffer-modified-p))
+ (should-not (eq (buffer-modified-p) t))
(insert "foo")
(should (buffer-modified-p))
(restore-buffer-modified-p nil)
@@ -1522,9 +1525,10 @@ with parameters from the *Messages* buffer modification."
(delete-file buffer-auto-save-file-name))))
(ert-with-temp-file file
+ (setq file (file-truename file))
(with-current-buffer (find-file file)
(auto-save-mode 1)
- (should-not (buffer-modified-p))
+ (should-not (eq (buffer-modified-p) t))
(insert "foo")
(should (buffer-modified-p))
(should-not (eq (buffer-modified-p) 'autosaved))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master d397b04215: Fix buffer-tests,
Eli Zaretskii <=