mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-05 11:45:52 +00:00
fix a bug in new ob-awk code
thank you test suite * lisp/ob-awk.el (org-babel-execute:awk): Don't need to apply the append, just need to append. * testing/lisp/test-ob-awk.el (ob-awk/input-src-block-1): Renamed to avoid name duplication and over-definition. (ob-awk/input-src-block-2): Renamed to avoid name duplication and over-definition.
This commit is contained in:
parent
7469454f54
commit
6fb033c791
@ -66,14 +66,14 @@ called by `org-babel-execute-src-block'"
|
||||
(insert (org-babel-awk-var-to-awk res)))
|
||||
tmp))))
|
||||
(cmd (mapconcat #'identity
|
||||
(apply #'append
|
||||
(list org-babel-awk-command
|
||||
"-f" code-file cmd-line)
|
||||
(mapcar (lambda (pair)
|
||||
(format "-v %s=%s"
|
||||
(cadr pair) (cddr pair)))
|
||||
(org-babel-get-header params :var))
|
||||
(list in-file))
|
||||
(append
|
||||
(list org-babel-awk-command
|
||||
"-f" code-file cmd-line)
|
||||
(mapcar (lambda (pair)
|
||||
(format "-v %s=%s"
|
||||
(cadr pair) (cddr pair)))
|
||||
(org-babel-get-header params :var))
|
||||
(list in-file))
|
||||
" ")))
|
||||
(org-babel-reassemble-table
|
||||
(let ((results
|
||||
|
@ -29,13 +29,13 @@
|
||||
(org-babel-next-src-block)
|
||||
(should (= 42 (org-babel-execute-src-block)))))
|
||||
|
||||
(ert-deftest ob-awk/input-src-block ()
|
||||
(ert-deftest ob-awk/input-src-block-1 ()
|
||||
"Test a code block as an input"
|
||||
(org-test-at-id "9e998b2a-3581-43fe-b26d-07d3c507b86a"
|
||||
(org-babel-next-src-block 2)
|
||||
(should (= 43 (org-babel-execute-src-block)))))
|
||||
|
||||
(ert-deftest ob-awk/input-src-block ()
|
||||
(ert-deftest ob-awk/input-src-block-2 ()
|
||||
"Test a code block as an input"
|
||||
(org-test-at-id "9e998b2a-3581-43fe-b26d-07d3c507b86a"
|
||||
(org-babel-next-src-block 3)
|
||||
|
Loading…
Reference in New Issue
Block a user