From: Mattias EngdegÄrd Date: Mon, 19 Dec 2022 11:05:09 +0000 (+0100) Subject: Repair setopt test after error demotion to warning X-Git-Tag: emacs-29.0.90~1072 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b3e7768a0ee0e894d7a4c232842af8be014ff8cb;p=emacs.git 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). --- diff --git a/test/lisp/cus-edit-tests.el b/test/lisp/cus-edit-tests.el index 0ef5168109b..31ba68b4107 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