123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- (require 'org-inlinetask)
- (ert-deftest test-org-inlinetask/org-inlinetask-goto-end ()
-
- (should
- (equal
- (let ((org-inlinetask-min-level 5)
- (org-adapt-indentation t))
- (org-test-with-temp-text
- "** H
- <point>***** I
- ***** END
- foo"
- (org-inlinetask-goto-end)
- (insert "<point>")
- (buffer-string)))
- "** H
- ***** I
- ***** END
- <point>foo"))
-
- (should
- (equal
- (let ((org-inlinetask-min-level 5)
- (org-adapt-indentation t))
- (org-test-with-temp-text
- "** H
- <point>***** I
- ***** END"
- (org-inlinetask-goto-end)
- (insert "<point>")
- (buffer-string)))
- "** H
- ***** I
- ***** END<point>"))
-
- (should
- (equal
- (let ((org-inlinetask-min-level 5)
- (org-adapt-indentation t))
- (org-test-with-temp-text
- "** H
- ****<point>* I
- ***** END
- ***** I
- ***** END"
- (org-inlinetask-goto-end)
- (insert "<point>")
- (buffer-string)))
- "** H
- ***** I
- ***** END
- <point>***** I
- ***** END"))
- (should
- (equal
- (let ((org-inlinetask-min-level 5)
- (org-adapt-indentation t))
- (org-test-with-temp-text
- "** H
- ***** I
- <point> inside
- ***** END
- ***** I
- ***** END"
- (org-inlinetask-goto-end)
- (insert "<point>")
- (buffer-string)))
- "** H
- ***** I
- inside
- ***** END
- <point>***** I
- ***** END")))
- (ert-deftest test-org-inlinetask/inlinetask-within-plain-list ()
- "Fold inlinetasks in plain-lists.
- Report:
- http://lists.gnu.org/archive/html/emacs-orgmode/2017-12/msg00502.html"
- (should
- (org-test-with-temp-text
- "* Test
- <point>- x
- - a
- *************** List folding stopped here
- *************** END
- - b
- "
- (org-cycle-internal-local)
- (invisible-p (1- (search-forward "- b"))))))
- (ert-deftest test-org-inlinetask/folding-directly-consecutive-tasks ()
- "Fold directly consecutive inlinetasks."
- (should
- (org-test-with-temp-text
- "* Test
- <point>- x
- - a
- *************** List folding stopped here
- *************** END
- *************** List folding stopped here
- *************** END
- - b
- "
- (org-cycle-internal-local)
- (invisible-p (1- (search-forward "- b"))))))
- (provide 'test-org-inlinetask)
|