aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGlenn Morris2019-07-06 12:51:30 -0700
committerGlenn Morris2019-07-06 12:51:30 -0700
commitbb856d12dc34a56be7a95ca5e55ddb1a78535d07 (patch)
tree2123f2d6728d4a043f2b8a07bd5368c010bb7d62 /test
parentef389fd9a5e6df06b8f7769ab32dc929dc4f0ed4 (diff)
parente97c0437aa135f9580cd8cc1ec912758e3610ab1 (diff)
downloademacs-bb856d12dc34a56be7a95ca5e55ddb1a78535d07.tar.gz
emacs-bb856d12dc34a56be7a95ca5e55ddb1a78535d07.zip
Merge from origin/emacs-26
e97c043 Fix python.el docstring (Bug#36458) e660801 ; Add thing-at-point-looking-at test (Bug#35708) f5b4846 ; Fix typo, insure -> ensure in ChangeLogs cb8fb59 * lisp/hi-lock.el (hi-lock-line-face-buffer): Doc fix. (Bug3...
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