emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals-release/org d85f415 3/4: Set org-adapt-indentation expl


From: ELPA Syncer
Subject: [elpa] externals-release/org d85f415 3/4: Set org-adapt-indentation explicitly in some tests
Date: Sat, 15 May 2021 08:57:12 -0400 (EDT)

branch: externals-release/org
commit d85f4158e2b7aaa1ac242e1615e5959343942435
Author: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Commit: Bastien <bzg@gnu.org>

    Set org-adapt-indentation explicitly in some tests
    
    * testing/lisp/test-org.el (test-org/with-electric-indent)
    (test-org/without-electric-indent): Make sure
    `org-adapt-indentation' is consistent with expected results.
---
 testing/lisp/test-org.el | 42 ++++++++++++++++++++++++------------------
 1 file changed, 24 insertions(+), 18 deletions(-)

diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index f71118d..f79086f 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -1404,12 +1404,14 @@
            (electric-indent-local-mode 1)
            (call-interactively 'org-return)
            (buffer-string))))
-  (should
-   (equal "* heading\n  body"
-         (org-test-with-temp-text "* heading<point>body"
-           (electric-indent-local-mode 1)
-           (call-interactively 'org-return)
-           (buffer-string))))
+  ;; TODO: test more values of `org-adapt-indentation'.
+  (let ((org-adapt-indentation t))
+    (should
+     (equal "* heading\n  body"
+           (org-test-with-temp-text "* heading<point>body"
+             (electric-indent-local-mode 1)
+             (call-interactively 'org-return)
+             (buffer-string)))))
   ;; C-j, like `electric-newline-and-maybe-indent', should not indent.
   (should
    (equal "  Para\ngraph"
@@ -1423,12 +1425,14 @@
            (electric-indent-local-mode 1)
            (call-interactively 'org-return-and-maybe-indent)
            (buffer-string))))
-  (should
-   (equal "* heading\nbody"
-         (org-test-with-temp-text "* heading<point>body"
-           (electric-indent-local-mode 1)
-           (call-interactively 'org-return-and-maybe-indent)
-           (buffer-string)))))
+  ;; TODO: test more values of `org-adapt-indentation'.
+  (let ((org-adapt-indentation t))
+    (should
+     (equal "* heading\nbody"
+           (org-test-with-temp-text "* heading<point>body"
+             (electric-indent-local-mode 1)
+             (call-interactively 'org-return-and-maybe-indent)
+             (buffer-string))))))
 
 (ert-deftest test-org/without-electric-indent ()
   "Test RET and C-j specifications with `electric-indent-mode' off."
@@ -1467,12 +1471,14 @@
            (electric-indent-local-mode 0)
            (call-interactively 'org-return-and-maybe-indent)
            (buffer-string))))
-  (should
-   (equal "* heading\n  body"
-         (org-test-with-temp-text "* heading<point>body"
-           (electric-indent-local-mode 0)
-           (call-interactively 'org-return-and-maybe-indent)
-           (buffer-string)))))
+  ;; TODO: test more values of `org-adapt-indentation'.
+  (let ((org-adapt-indentation t))
+    (should
+     (equal "* heading\n  body"
+           (org-test-with-temp-text "* heading<point>body"
+             (electric-indent-local-mode 0)
+             (call-interactively 'org-return-and-maybe-indent)
+             (buffer-string))))))
 
 (ert-deftest test-org/meta-return ()
   "Test M-RET (`org-meta-return') specifications."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]