(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