forked from mirrors/org-mode
Fix typo
* lisp/org.el (org-at-property-drawer-p): Fix typo. * testing/lisp/test-org.el (test-org/at-property-drawer-p): Update name and function calls. Add a test.
This commit is contained in:
parent
8580ef6ec1
commit
ed0e75d241
|
@ -12474,7 +12474,7 @@ FORCE is non-nil, or return nil."
|
|||
"Non-nil when point is at the first line of a property drawer."
|
||||
(org-with-wide-buffer
|
||||
(beginning-of-line)
|
||||
(and (looking-at org-property-start-re)
|
||||
(and (looking-at org-property-drawer-re)
|
||||
(or (bobp)
|
||||
(progn
|
||||
(forward-line -1)
|
||||
|
|
|
@ -397,22 +397,23 @@
|
|||
(org-test-with-temp-text ":PROPERTIES:\n<point>:PROP: t\n:END:\n"
|
||||
(org-at-property-p)))))
|
||||
|
||||
(ert-deftest test-org/at-property-block-p ()
|
||||
"Test `org-at-property-block-p' specifications."
|
||||
(ert-deftest test-org/at-property-drawer-p ()
|
||||
"Test `org-at-property-drawer-p' specifications."
|
||||
(should
|
||||
(equal 't
|
||||
(org-test-with-temp-text "* H\n<point>:PROPERTIES:\n:PROP: t\n:END:\n"
|
||||
(org-at-property-block-p))))
|
||||
(org-test-with-temp-text "* H\n<point>:PROPERTIES:\n:PROP: t\n:END:\n"
|
||||
(org-at-property-drawer-p)))
|
||||
(should
|
||||
(equal 't
|
||||
(org-test-with-temp-text ":PROPERTIES:\n:PROP: t\n:END:\n"
|
||||
(org-at-property-block-p))))
|
||||
;; The function only returns t if point is at the first line of a
|
||||
;; property block.
|
||||
(org-test-with-temp-text ":PROPERTIES:\n:PROP: t\n:END:\n"
|
||||
(org-at-property-drawer-p)))
|
||||
;; The function only returns t if point is at the first line of
|
||||
;; a property block.
|
||||
(should-not
|
||||
(equal 't
|
||||
(org-test-with-temp-text ":PROPERTIES:\n<point>:PROP: t\n:END:\n"
|
||||
(org-at-property-block-p)))))
|
||||
(org-test-with-temp-text ":PROPERTIES:\n<point>:PROP: t\n:END:\n"
|
||||
(org-at-property-drawer-p)))
|
||||
;; The function ignores incomplete drawers.
|
||||
(should-not
|
||||
(org-test-with-temp-text ":PROPERTIES:\n<point>:PROP: t\n"
|
||||
(org-at-property-drawer-p))))
|
||||
|
||||
(ert-deftest test-org/get-property-block ()
|
||||
"Test `org-get-property-block' specifications."
|
||||
|
|
Loading…
Reference in New Issue