test-org-element/at-point: Add new test
* testing/lisp/test-org-element.el (test-org-element/at-point): Test when point is not in current buffer.
This commit is contained in:
parent
9249275738
commit
fcde1f779d
|
@ -4202,6 +4202,15 @@ Text
|
|||
(org-test-with-temp-text "#+BEGIN_CENTER\nA\n#+END_CENTER"
|
||||
(progn (search-forward "A")
|
||||
(org-element-type (org-element-at-point))))))
|
||||
;; Point in other buffer.
|
||||
(should
|
||||
(eq 'paragraph
|
||||
(org-test-with-temp-text "#+BEGIN_CENTER\nA\n#+END_CENTER"
|
||||
(progn (search-forward "A")
|
||||
(org-element-type
|
||||
(let ((mk (point-marker)))
|
||||
(with-temp-buffer
|
||||
(org-element-at-point mk))))))))
|
||||
;; Correctly set `:parent' property.
|
||||
(should
|
||||
(eq 'center-block
|
||||
|
|
Loading…
Reference in New Issue