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

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

[elpa] externals/org 524e0e0b7b 3/4: test-ob: Test indentation of multil


From: ELPA Syncer
Subject: [elpa] externals/org 524e0e0b7b 3/4: test-ob: Test indentation of multiline text in list output
Date: Sat, 22 Oct 2022 00:58:05 -0400 (EDT)

branch: externals/org
commit 524e0e0b7b5eb4c02f3da5eaf59eb1df82d1c1cc
Author: Rudolf Adamkovič <salutis@me.com>
Commit: Ihor Radchenko <yantar92@posteo.net>

    test-ob: Test indentation of multiline text in list output
    
    * testing/lisp/test-ob.el (test-ob/org-babel-results-indented-list):
    Add a regression test for the recent change to ob-core list formatting
    in e7005787993f521f76e99f00e8a04d87703c493f.
---
 testing/lisp/test-ob.el | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
index 4ac278fafc..4beaecf7bd 100644
--- a/testing/lisp/test-ob.el
+++ b/testing/lisp/test-ob.el
@@ -1175,6 +1175,29 @@ trying to find the :END: marker."
     (org-babel-execute-src-block)
     (org-babel-execute-src-block)))
 
+(ert-deftest test-ob/org-babel-results-indented-list ()
+  "Test that :results value list indents multi-line items correctly."
+  (should
+   (string= "- Foo1
+  Bar1
+- Foo2
+
+  Bar2
+"
+            (org-test-with-temp-text
+                "#+begin_src emacs-lisp :results value list
+'(\"Foo1
+Bar1\"
+  \"Foo2
+
+Bar2\")
+#+end_src"
+              (org-babel-execute-src-block)
+              (org-forward-element)
+              (org-narrow-to-element)
+              (delete-trailing-whitespace)
+              (buffer-string)))))
+
 (ert-deftest test-ob/file-desc-header-argument ()
   "Test that the :file-desc header argument is used."
   (org-test-with-temp-text "#+begin_src emacs-lisp :results file :file-desc bar



reply via email to

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