Strengthen widget-get/put tests
* test/lisp/wid-edit-tests.el (widget-test-editable-field-widget-get/put): Test on inherited properties.
This commit is contained in:
parent
773108fc04
commit
932397ce52
1 changed files with 12 additions and 1 deletions
|
@ -33,7 +33,18 @@
|
|||
(should (eq (widget-put widget :size 1) 1))
|
||||
(should (equal (widget-put widget :format "foo") "foo"))
|
||||
(should (eq (widget-get widget :size) 1))
|
||||
(should (equal (widget-get widget :format) "foo")))))
|
||||
(should (equal (widget-get widget :format) "foo"))
|
||||
|
||||
;; test get/put for inherited properties
|
||||
(should-not (plist-member (cdr widget) :validate))
|
||||
(should (eq (widget-get widget :validate) 'widget-field-validate))
|
||||
(should (eq (widget-put widget :validate 'my-silly-validate)
|
||||
'my-silly-validate))
|
||||
(should (plist-member (cdr widget) :validate))
|
||||
(should (eq (widget-get widget :validate) 'my-silly-validate))
|
||||
(should (eq (widget-get (get (widget-type widget) 'widget-type)
|
||||
:validate)
|
||||
'widget-field-validate)))))
|
||||
|
||||
(ert-deftest widget-at ()
|
||||
(with-temp-buffer
|
||||
|
|
Loading…
Add table
Reference in a new issue