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)
(geiser-repl-exit))
(set-process-query-on-exit-flag (get-buffer-process repl-buffer) nil)
(kill-buffer repl-buffer))
(setq result (if (or (string= result "#<void>")
(string= result "#<unspecified>"))
nil
result)))))
(kill-buffer repl-buffer)))))
result))
(defun org-babel-scheme--table-or-string (results)

View File

@ -41,29 +41,50 @@
(ert-deftest test-ob-scheme/prologue ()
"Test :prologue parameter."
(equal "#+begin_src scheme :prologue \"(define x 2)\"
(should
(equal "#+begin_src scheme :prologue \"(define x 2)\"
x
#+end_src
#+RESULTS:
: 2
"
(org-test-with-temp-text
"#+begin_src scheme :prologue \"(define x 2)\"\nx\n#+end_src"
(org-babel-execute-maybe)
(buffer-string)))
(equal
"#+begin_src scheme :prologue \"(define x 2)\" :var y=1
(org-test-with-temp-text
"#+begin_src scheme :prologue \"(define x 2)\"\nx\n#+end_src"
(org-babel-execute-maybe)
(buffer-string))))
(should
(equal
"#+begin_src scheme :prologue \"(define x 2)\" :var y=1
x
#+end_src
#+RESULTS:
: 2
"
(org-test-with-temp-text
"#+begin_src scheme :prologue \"(define x 2)\" :var y=1\nx\n#+end_src"
(org-babel-execute-maybe)
(buffer-string))))
(org-test-with-temp-text
"#+begin_src scheme :prologue \"(define x 2)\" :var y=1\nx\n#+end_src"
(org-babel-execute-maybe)
(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)