aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lisp/thingatpt-tests.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/lisp/thingatpt-tests.el b/test/lisp/thingatpt-tests.el
index 347cc7f12cb..c851a7ccafd 100644
--- a/test/lisp/thingatpt-tests.el
+++ b/test/lisp/thingatpt-tests.el
@@ -20,6 +20,7 @@
20;;; Code: 20;;; Code:
21 21
22(require 'ert) 22(require 'ert)
23(require 'thingatpt)
23 24
24(defvar thing-at-point-test-data 25(defvar thing-at-point-test-data
25 '(("https://1.gnu.org" 1 url "https://1.gnu.org") 26 '(("https://1.gnu.org" 1 url "https://1.gnu.org")
@@ -134,4 +135,15 @@ position to retrieve THING.")
134 (goto-char 23) 135 (goto-char 23)
135 (should (equal (thing-at-point 'url) "http://foo/bar(baz)")))) 136 (should (equal (thing-at-point 'url) "http://foo/bar(baz)"))))
136 137
138(ert-deftest thing-at-point-looking-at ()
139 (with-temp-buffer
140 (insert "1abcd 2abcd 3abcd")
141 (goto-char (point-min))
142 (let ((m2 (progn (search-forward "2abcd")
143 (match-data))))
144 (goto-char (point-min))
145 (search-forward "2ab")
146 (should (thing-at-point-looking-at "2abcd"))
147 (should (equal (match-data) m2)))))
148
137;;; thingatpt.el ends here 149;;; thingatpt.el ends here