12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- (ert-deftest test-org-element/archive-update-status-cookie ()
- "Test archiving properly updating status cookies."
-
- (should
- (equal
- "Top [0%]"
- (org-test-with-temp-text-in-file
- "* Top [%]\n<point>** DONE One\n** TODO Two"
- (org-archive-subtree)
- (forward-line -1)
- (org-element-property :title (org-element-at-point)))))
-
- (should
- (equal
- "Top [100%]"
- (org-test-with-temp-text-in-file "* Top [%]\n<point>** TODO Two"
- (org-archive-subtree)
- (forward-line -1)
- (org-element-property :title (org-element-at-point)))))
-
- (should
- (equal
- "Top [100%]"
- (org-test-with-temp-text "* Top [%]\n<point>** TODO One\n** DONE Two"
- (org-archive-to-archive-sibling)
- (forward-line -1)
- (org-element-property :title (org-element-at-point)))))
-
- (should
- (equal
- "Top [0%]"
- (org-test-with-temp-text "* Top [%]\n<point>** DONE Two"
- (org-archive-to-archive-sibling)
- (forward-line -1)
- (org-element-property :title (org-element-at-point))))))
- (provide 'test-org-archive)
|