adding simple test of variable resolution
This commit is contained in:
parent
a9f3c9fe11
commit
3d2aec3588
|
@ -41,7 +41,6 @@
|
|||
#+results:
|
||||
: 4
|
||||
|
||||
|
||||
* excessive id links on tangling
|
||||
:PROPERTIES:
|
||||
:ID: ef06fd7f-012b-4fde-87a2-2ae91504ea7e
|
||||
|
@ -59,3 +58,20 @@
|
|||
#+begin_src emacs-lisp :tangle no
|
||||
(message "for tangling")
|
||||
#+end_src
|
||||
* simple variable resolution
|
||||
:PROPERTIES:
|
||||
:ID: f68821bc-7f49-4389-85b5-914791ee3718
|
||||
:END:
|
||||
|
||||
#+source: four
|
||||
#+begin_src emacs-lisp
|
||||
(list 1 2 3 4)
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp :var four=four
|
||||
(length four)
|
||||
#+end_src
|
||||
|
||||
#+results:
|
||||
: 4
|
||||
|
||||
|
|
|
@ -36,14 +36,20 @@
|
|||
(let ((info (org-babel-get-src-block-info)))
|
||||
(should (string= "no" (cdr (assoc :tangle (nth 2 info))))))))
|
||||
|
||||
;;; elisp forms in header arguments
|
||||
(ert-deftest test-org-babel-elisp-in-header-arguments ()
|
||||
"Test execution of elisp forms in header arguments."
|
||||
;; at the babel.org:elisp-forms-in-header-arguments header
|
||||
(org-test-at-id "22d67284-bf14-4cdc-8319-f4bd876829d7"
|
||||
(org-babel-next-src-block)
|
||||
(let ((info (org-babel-get-src-block-info)))
|
||||
(should (= 4 (org-babel-execute-src-block))))))
|
||||
|
||||
(ert-deftest test-org-babel-simple-variable-resolution ()
|
||||
"Test that simple variable resolution is working."
|
||||
(org-test-at-id "f68821bc-7f49-4389-85b5-914791ee3718"
|
||||
(org-babel-next-src-block 2)
|
||||
(should (= 4 (org-babel-execute-src-block)))))
|
||||
|
||||
(provide 'test-ob)
|
||||
|
||||
;;; test-ob ends here
|
Loading…
Reference in New Issue