Add some very rudimentary field-beginning/end tests
This commit is contained in:
parent
c139d289df
commit
f6959d05f4
1 changed files with 13 additions and 0 deletions
|
@ -413,4 +413,17 @@
|
|||
(translate-region-internal (point-min) (point-max) tt)
|
||||
(should (string-equal (buffer-string) "*")))))
|
||||
|
||||
(ert-deftest find-fields ()
|
||||
(with-temp-buffer
|
||||
(insert "foo" (propertize "bar" 'field 'bar) "zot")
|
||||
(goto-char (point-min))
|
||||
(should (= (field-beginning) (point-min)))
|
||||
(should (= (field-end) 4))
|
||||
(goto-char 5)
|
||||
(should (= (field-beginning) 4))
|
||||
(should (= (field-end) 7))
|
||||
(goto-char 8)
|
||||
(should (= (field-beginning) 7))
|
||||
(should (= (field-end) (point-max)))))
|
||||
|
||||
;;; editfns-tests.el ends here
|
||||
|
|
Loading…
Add table
Reference in a new issue