diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-10-14 09:08:44 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-10-14 09:08:44 +0200 |
commit | 085f150372ef5db69eaa5ec210fbceba0262d854 (patch) | |
tree | 6d12ee1e456b05007f8a896ea51e5fa529968eb5 | |
parent | ee4af962022786f82b389be4b13018800ace63c7 (diff) | |
download | org-mode-085f150372ef5db69eaa5ec210fbceba0262d854.tar.gz |
ob-tangle: Add a test
* testing/lisp/test-ob-tangle.el (ob-tangle/block-order): Add test.
-rw-r--r-- | testing/lisp/test-ob-tangle.el | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testing/lisp/test-ob-tangle.el b/testing/lisp/test-ob-tangle.el index 1dfd1a9..2eb2c96 100644 --- a/testing/lisp/test-ob-tangle.el +++ b/testing/lisp/test-ob-tangle.el @@ -265,6 +265,35 @@ another block (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)) + (with-temp-buffer + (insert-file-contents file) + (org-split-string (buffer-string)))) (delete-file file)))))) (provide 'test-ob-tangle) |