From 6bc4c15c4a76a98c841e8a200c75f5a0737ffece Mon Sep 17 00:00:00 2001 From: Michael Brand Date: Mon, 9 Sep 2013 18:38:58 +0200 Subject: [PATCH 1/2] Add ERTs for org-meta-return * testing/lisp/test-org-list.el (test-org-list/insert-item): Adapt docstring. * (test-org-list/meta-return): New `ert-deftest' to test `org-meta-return'. --- testing/lisp/test-org-list.el | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/testing/lisp/test-org-list.el b/testing/lisp/test-org-list.el index ac81d4d..ea19606 100644 --- a/testing/lisp/test-org-list.el +++ b/testing/lisp/test-org-list.el @@ -627,7 +627,7 @@ (should (org-invisible-p2)))) (ert-deftest test-org-list/insert-item () - "Test item insertion." + "Test item insertion with `org-insert-item'." ;; Blank lines specifications. ;; ;; Non-nil `org-blank-before-new-entry': insert a blank line, unless @@ -713,6 +713,22 @@ (forward-line -1) (looking-at "$"))))) +(ert-deftest test-org-list/meta-return () + "Test item insertion with `org-meta-return'." + (should + (org-test-with-temp-text "- a" + (org-meta-return) + (beginning-of-line) + (looking-at "- $"))) + ;; TODO Insert an item also in a drawer. + (should + (let ((org-drawers '("MYDRAWER"))) + (org-test-with-temp-text ":MYDRAWER:\n- a\n:END:" + (forward-line) + (org-meta-return) + (forward-line -1) + (looking-at "$"))))) + (ert-deftest test-org-list/repair () "Test `org-list-repair' specifications." ;; Repair indentation. -- 1.7.12.4 (Apple Git-37)