>From 9cb3c86abcc1fe983b5e6d2ff7a80c1d714fb126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= Date: Fri, 21 Oct 2022 16:26:33 +0200 Subject: [PATCH] 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 4ac278faf..4beaecf7b 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 -- 2.38.0