org-babel-import-elisp-from-file: Fix when \"s are not around
* lisp/ob-core.el (org-babel-string-read): Only considered \" at the string boundaries, not inside. * testing/lisp/test-ob-shell.el (ob-shell/results-table): Add a test.
This commit is contained in:
parent
f8a9cd2308
commit
9a3dd429bb
|
@ -3205,7 +3205,7 @@ If the table is trivial, then return it as a scalar."
|
|||
(defun org-babel-string-read (cell)
|
||||
"Strip nested \"s from around strings."
|
||||
(org-babel-read (or (and (stringp cell)
|
||||
(string-match "\"\\(.+\\)\"" cell)
|
||||
(string-match "^[[:space:]]*\"\\(.+\\)\"[[:space:]]*$" cell)
|
||||
(match-string 1 cell))
|
||||
cell) t))
|
||||
|
||||
|
|
|
@ -162,6 +162,15 @@ ob-comint.el, which was not previously tested."
|
|||
"\nhello tramp from " (file-local-name default-directory))))
|
||||
(should (equal result expected)))))))
|
||||
|
||||
(ert-deftest ob-shell/results-table ()
|
||||
"Test :results table."
|
||||
(should
|
||||
(equal '(("I \"want\" it all"))
|
||||
(org-test-with-temp-text
|
||||
"#+BEGIN_SRC sh :results table\necho 'I \"want\" it all'\n#+END_SRC"
|
||||
(org-babel-execute-src-block)))))
|
||||
|
||||
|
||||
(provide 'test-ob-shell)
|
||||
|
||||
;;; test-ob-shell.el ends here
|
||||
|
|
Loading…
Reference in New Issue