Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2017-09-14 15:25:36 +02:00
commit 04498a4fbd
2 changed files with 33 additions and 16 deletions

View File

@ -180,11 +180,7 @@ is true; otherwise returns the last value."
(save-current-buffer (set-buffer repl-buffer) (save-current-buffer (set-buffer repl-buffer)
(geiser-repl-exit)) (geiser-repl-exit))
(set-process-query-on-exit-flag (get-buffer-process repl-buffer) nil) (set-process-query-on-exit-flag (get-buffer-process repl-buffer) nil)
(kill-buffer repl-buffer)) (kill-buffer repl-buffer)))))
(setq result (if (or (string= result "#<void>")
(string= result "#<unspecified>"))
nil
result)))))
result)) result))
(defun org-babel-scheme--table-or-string (results) (defun org-babel-scheme--table-or-string (results)

View File

@ -41,6 +41,7 @@
(ert-deftest test-ob-scheme/prologue () (ert-deftest test-ob-scheme/prologue ()
"Test :prologue parameter." "Test :prologue parameter."
(should
(equal "#+begin_src scheme :prologue \"(define x 2)\" (equal "#+begin_src scheme :prologue \"(define x 2)\"
x x
#+end_src #+end_src
@ -51,7 +52,8 @@ x
(org-test-with-temp-text (org-test-with-temp-text
"#+begin_src scheme :prologue \"(define x 2)\"\nx\n#+end_src" "#+begin_src scheme :prologue \"(define x 2)\"\nx\n#+end_src"
(org-babel-execute-maybe) (org-babel-execute-maybe)
(buffer-string))) (buffer-string))))
(should
(equal (equal
"#+begin_src scheme :prologue \"(define x 2)\" :var y=1 "#+begin_src scheme :prologue \"(define x 2)\" :var y=1
x x
@ -63,7 +65,26 @@ x
(org-test-with-temp-text (org-test-with-temp-text
"#+begin_src scheme :prologue \"(define x 2)\" :var y=1\nx\n#+end_src" "#+begin_src scheme :prologue \"(define x 2)\" :var y=1\nx\n#+end_src"
(org-babel-execute-maybe) (org-babel-execute-maybe)
(buffer-string)))) (buffer-string)))))
(ert-deftest test-ob-scheme/unspecified ()
"Test <#unspecified> return value."
(should
(equal "#+begin_src scheme
\(define (mysquare x)
(* x x))
#+end_src
#+RESULTS:
: #<unspecified>
"
(org-test-with-temp-text
"#+begin_src scheme
(define (mysquare x)
(* x x))
#+end_src"
(org-babel-execute-maybe)
(buffer-string)))))
(provide 'test-ob-scheme) (provide 'test-ob-scheme)