[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 b3e7768a0e: Repair setopt test after error demotion to warning
From: |
Mattias Engdegård |
Subject: |
emacs-29 b3e7768a0e: Repair setopt test after error demotion to warning |
Date: |
Mon, 19 Dec 2022 06:08:37 -0500 (EST) |
branch: emacs-29
commit b3e7768a0ee0e894d7a4c232842af8be014ff8cb
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Repair setopt test after error demotion to warning
* test/lisp/cus-edit-tests.el (test-setopt):
Check for a warrning instead of an error in attempt to call `setopt`
with a value that does not match the declared type (bug#60162).
---
test/lisp/cus-edit-tests.el | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/test/lisp/cus-edit-tests.el b/test/lisp/cus-edit-tests.el
index 0ef5168109..31ba68b410 100644
--- a/test/lisp/cus-edit-tests.el
+++ b/test/lisp/cus-edit-tests.el
@@ -83,7 +83,14 @@
(ert-deftest test-setopt ()
(should (= (setopt cus-edit-test-foo1 1) 1))
(should (= cus-edit-test-foo1 1))
- (should-error (setopt cus-edit-test-foo1 :foo)))
-
+ (let* ((text-quoting-style 'grave)
+ (warn-txt
+ (with-current-buffer (get-buffer-create "*Warnings*")
+ (let ((inhibit-read-only t))
+ (erase-buffer))
+ (setopt cus-edit-test-foo1 :foo)
+ (buffer-substring-no-properties (point-min) (point-max)))))
+ (should (string-search "Value `:foo' does not match type number"
+ warn-txt))))
(provide 'cus-edit-tests)
;;; cus-edit-tests.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 b3e7768a0e: Repair setopt test after error demotion to warning,
Mattias Engdegård <=