ob-tangle: Add a test

* testing/lisp/test-ob-tangle.el (ob-tangle/block-order): Add test.
This commit is contained in:
Nicolas Goaziou 2018-10-14 09:08:44 +02:00
parent ee4af96202
commit 085f150372
1 changed files with 29 additions and 0 deletions

View File

@ -259,6 +259,35 @@ another block
#+begin_src bar
2
#+end_src"
file)
(org-babel-tangle))
(with-temp-buffer
(insert-file-contents file)
(org-split-string (buffer-string))))
(delete-file file)))))
;; Preserve order with mixed languages.
(should
(equal '("1" "3" "2" "4")
(let ((file (make-temp-file "org-tangle-")))
(unwind-protect
(progn
(org-test-with-temp-text-in-file
(format "#+property: header-args :tangle %S
#+begin_src foo
1
#+end_src
#+begin_src bar
2
#+end_src
#+begin_src foo
3
#+end_src
#+begin_src bar
4
#+end_src"
file)
(org-babel-tangle))