org-mode/testing/lisp
Michael Brand a77442b37b Use nan for empty fields in Calc formulas
* doc/org.texi (Formula syntax for Calc): Add explanation and example
for empty field.
* lisp/org-table.el (org-table-eval-formula): Use `keep-empty' in more
places.
(org-table-make-reference): Use nan (not a number) for empty fields in
Calc formulas.
* testing/lisp/test-org-table.el: Adapt expected for several
ert-deftest.
(test-org-table/empty-field): New examples dealing with empty fields.
(test-org-table/copy-field): New ert-deftest with examples dealing with
empty fields.

This makes it possible to write spreadsheet Calc formulas that check
for empty fields:  To sum the first two columns unless one or both
empty:
$3 = if("$1" = "nan" || "$2" = "nan", string(""), $1 + $2); E
2012-12-29 14:33:52 +01:00
..
test-ob-awk.el Fix copyright notices for test files. 2012-12-13 17:24:19 +01:00
test-ob-C.el Fix copyright notices for test files. 2012-12-13 17:24:19 +01:00
test-ob-emacs-lisp.el org-test.el (org-test-with-temp-text-in-file): Wrap ,@body into (progn ...). 2012-12-15 08:49:23 +01:00
test-ob-exp.el test-ob-exp.el (ob-exp/exports-inline): Fix test 2012-12-21 08:55:14 +01:00
test-ob-fortran.el Fix copyright notices for test files. 2012-12-13 17:24:19 +01:00
test-ob-lilypond.el Fix copyright notices for test files. 2012-12-13 17:24:19 +01:00
test-ob-lob.el Update the tests wrt previous commit. 2012-12-20 18:54:57 +01:00
test-ob-maxima.el Fix copyright notices for test files. 2012-12-13 17:24:19 +01:00
test-ob-octave.el Fix copyright notices for test files. 2012-12-13 17:24:19 +01:00
test-ob-python.el Fix copyright notices for test files. 2012-12-13 17:24:19 +01:00
test-ob-R.el Fix copyright notices for test files. 2012-12-13 17:24:19 +01:00
test-ob-sh.el Fix copyright notices for test files. 2012-12-13 17:24:19 +01:00
test-ob-table.el Fix copyright notices for test files. 2012-12-13 17:24:19 +01:00
test-ob-tangle.el Fix copyright notices for test files. 2012-12-13 17:24:19 +01:00
test-ob.el org-test.el (org-test-with-temp-text-in-file): Wrap ,@body into (progn ...). 2012-12-15 08:49:23 +01:00
test-org-clock.el Fix new test for clocktables 2012-12-07 19:50:01 +01:00
test-org-element.el org-element: Add tests 2012-12-18 22:16:01 +01:00
test-org-exp.el Update the tests wrt previous commit. 2012-12-20 18:54:57 +01:00
test-org-export.el org-export: Implement function to locally override translation table 2012-12-19 17:48:51 +01:00
test-org-footnote.el org-footnote: Fix bug related to sorting and folded view 2012-04-08 12:01:57 +02:00
test-org-html.el Fix copyright notices for test files. 2012-12-13 17:24:19 +01:00
test-org-list.el org-list: Fix infloop when inserting an item 2012-11-13 15:45:09 +01:00
test-org-src.el org-test.el (org-test-with-temp-text-in-file): Wrap ,@body into (progn ...). 2012-12-15 08:49:23 +01:00
test-org-table.el Use nan for empty fields in Calc formulas 2012-12-29 14:33:52 +01:00
test-org.el Merge branch 'maint' 2012-12-13 17:24:31 +01:00
test-property-inheritance.el Fix copyright notices for test files. 2012-12-13 17:24:19 +01:00