diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-12-19 17:12:18 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-12-19 17:12:18 +0100 |
commit | f6959d05f4b9015ea79050053898b85a1af3ea91 (patch) | |
tree | c23c015400509fe579e1bfaec8912bbe18fdc4bb | |
parent | c139d289df4c76807501c3e35b0d8f4bc8d511ce (diff) | |
download | emacs-f6959d05f4b9015ea79050053898b85a1af3ea91.tar.gz emacs-f6959d05f4b9015ea79050053898b85a1af3ea91.tar.bz2 emacs-f6959d05f4b9015ea79050053898b85a1af3ea91.zip |
Add some very rudimentary field-beginning/end tests
-rw-r--r-- | test/src/editfns-tests.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el index e83dd7c857b..6b2eb32396e 100644 --- a/test/src/editfns-tests.el +++ b/test/src/editfns-tests.el @@ -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 |