|
@@ -40,41 +40,42 @@
|
|
|
(ert-deftest test-ob-lob/call-with-header-arguments ()
|
|
|
"Test the evaluation of a library of babel #+call: line."
|
|
|
(letf (((symbol-function 'org-babel-insert-result)
|
|
|
- (symbol-function 'ignore)))
|
|
|
+ (symbol-function 'ignore)))
|
|
|
(org-test-at-id "fab7e291-fde6-45fc-bf6e-a485b8bca2f0"
|
|
|
(move-beginning-of-line 1)
|
|
|
(forward-line 6)
|
|
|
(message (buffer-substring (point-at-bol) (point-at-eol)))
|
|
|
- (should (string= "testing" (org-babel-lob-execute
|
|
|
- (org-babel-lob-get-info))))
|
|
|
+ (should (string= "testing" (org-babel-execute-src-block
|
|
|
+ nil (org-babel-lob-get-info))))
|
|
|
(forward-line 1)
|
|
|
- (should (string= "testing" (caar (org-babel-lob-execute
|
|
|
- (org-babel-lob-get-info)))))
|
|
|
+ (should (string= "testing" (caar (org-babel-execute-src-block
|
|
|
+ nil (org-babel-lob-get-info)))))
|
|
|
(forward-line 1)
|
|
|
- (should (string= "testing" (org-babel-lob-execute
|
|
|
- (org-babel-lob-get-info))))
|
|
|
+ (should (string= "testing" (org-babel-execute-src-block
|
|
|
+ nil (org-babel-lob-get-info))))
|
|
|
(forward-line 1)
|
|
|
- (should (string= "testing" (caar (org-babel-lob-execute
|
|
|
- (org-babel-lob-get-info)))))
|
|
|
+ (should (string= "testing" (caar (org-babel-execute-src-block
|
|
|
+ nil (org-babel-lob-get-info)))))
|
|
|
(forward-line 1)
|
|
|
- (should (string= "testing" (org-babel-lob-execute
|
|
|
- (org-babel-lob-get-info))))
|
|
|
+ (should (string= "testing" (org-babel-execute-src-block
|
|
|
+ nil (org-babel-lob-get-info))))
|
|
|
(forward-line 1)
|
|
|
- (should (string= "testing" (caar (org-babel-lob-execute
|
|
|
- (org-babel-lob-get-info)))))
|
|
|
+ (should (string= "testing" (caar (org-babel-execute-src-block
|
|
|
+ nil (org-babel-lob-get-info)))))
|
|
|
(forward-line 1) (beginning-of-line) (forward-char 27)
|
|
|
- (should (string= "testing" (org-babel-lob-execute
|
|
|
- (org-babel-lob-get-info))))
|
|
|
+ (should (string= "testing" (org-babel-execute-src-block
|
|
|
+ nil (org-babel-lob-get-info))))
|
|
|
(forward-line 1) (beginning-of-line) (forward-char 27)
|
|
|
- (should (string= "testing" (caar (org-babel-lob-execute
|
|
|
- (org-babel-lob-get-info)))))
|
|
|
+ (should (string= "testing" (caar (org-babel-execute-src-block
|
|
|
+ nil (org-babel-lob-get-info)))))
|
|
|
(forward-line 1) (beginning-of-line)
|
|
|
- (should (= 4 (org-babel-lob-execute (org-babel-lob-get-info))))
|
|
|
+ (should (= 4 (org-babel-execute-src-block nil (org-babel-lob-get-info))))
|
|
|
(forward-line 1)
|
|
|
- (should (string= "testing" (org-babel-lob-execute
|
|
|
- (org-babel-lob-get-info))))
|
|
|
+ (should (string= "testing" (org-babel-execute-src-block
|
|
|
+ nil (org-babel-lob-get-info))))
|
|
|
(forward-line 1)
|
|
|
- (should (string= "123" (org-babel-lob-execute (org-babel-lob-get-info)))))))
|
|
|
+ (should (string= "123" (org-babel-execute-src-block
|
|
|
+ nil (org-babel-lob-get-info)))))))
|
|
|
|
|
|
(ert-deftest test-ob-lob/export-lob-lines ()
|
|
|
"Test the export of a variety of library babel call lines."
|
|
@@ -118,9 +119,11 @@ for export
|
|
|
<point>#+call: call-line-caching-example(\"qux\") :cache yes
|
|
|
"
|
|
|
;; first execution should flip value to t
|
|
|
- (should (equal (org-babel-lob-execute (org-babel-lob-get-info)) 1))
|
|
|
+ (should
|
|
|
+ (eq (org-babel-execute-src-block nil (org-babel-lob-get-info)) 1))
|
|
|
;; if cached, second evaluation will retain the t value
|
|
|
- (should (equal (org-babel-lob-execute (org-babel-lob-get-info)) 1)))))
|
|
|
+ (should
|
|
|
+ (eq (org-babel-execute-src-block nil (org-babel-lob-get-info)) 1)))))
|
|
|
|
|
|
(ert-deftest test-ob-lob/named-caching-call-line ()
|
|
|
(let ((temporary-value-for-test 0))
|
|
@@ -134,9 +137,11 @@ for export
|
|
|
<point>#+call: call-line-caching-example(\"qux\") :cache yes
|
|
|
"
|
|
|
;; first execution should flip value to t
|
|
|
- (should (equal (org-babel-lob-execute (org-babel-lob-get-info)) 1))
|
|
|
+ (should
|
|
|
+ (eq (org-babel-execute-src-block nil (org-babel-lob-get-info)) 1))
|
|
|
;; if cached, second evaluation will retain the t value
|
|
|
- (should (equal (org-babel-lob-execute (org-babel-lob-get-info)) 1)))))
|
|
|
+ (should
|
|
|
+ (eq (org-babel-execute-src-block nil (org-babel-lob-get-info)) 1)))))
|
|
|
|
|
|
(provide 'test-ob-lob)
|
|
|
|