Skip to content

Instantly share code, notes, and snippets.

@ebellani
Created February 13, 2016 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebellani/d271093faaa943674df6 to your computer and use it in GitHub Desktop.
Save ebellani/d271093faaa943674df6 to your computer and use it in GitHub Desktop.
minimal example of multi expressions for a column
#+NAME: generic-tester
#+BEGIN_SRC emacs-lisp :var result="" :var expected="" :exports none
(if (equal expected result) "pass" (format "expected %S, found %S" expected result))
#+END_SRC
#+NAME: python-version
#+BEGIN_SRC python :var x=0 :var y=0
return x+y
#+END_SRC
| el1 | el2 | expected | python version |
|-----+-----+----------+---------------------|
| 5 | 3 | 8 | pass |
| 1 | 0 | 2 | expected 2, found 1 |
#+TBLFM: $4='(org-sbe "python-version" (x $1) (y $2))::$4='(org-sbe "generic-tester" (expected $3) (result $4))::
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment