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 e700578799.
This commit is contained in:
Rudolf Adamkovič 2022-10-21 16:26:33 +02:00 committed by Ihor Radchenko
parent a83edd624b
commit 524e0e0b7b
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 23 additions and 0 deletions

View File

@ -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