diff options
author | David Maus <dmaus@ictsoc.de> | 2011-01-11 22:07:33 +0100 |
---|---|---|
committer | David Maus <dmaus@ictsoc.de> | 2011-01-11 22:07:33 +0100 |
commit | 048f32d075c88459b22e59cb36cdc15b77016710 (patch) | |
tree | a8fba158e4f034043d83db367c0d0595d8284073 | |
parent | 378beac76220e8b55e4c0d24b4f02ddba5142bbe (diff) | |
download | org-mode-048f32d075c88459b22e59cb36cdc15b77016710.tar.gz |
Provide tests for table formular format conversion
* test-org-table.el (test-org-table/org-table-convert-refs-to-rc/3)
(test-org-table/org-table-convert-refs-to-rc/2)
(test-org-table/org-table-convert-refs-to-rc/1)
(test-org-table/org-table-convert-refs-to-an/3)
(test-org-table/org-table-convert-refs-to-an/2)
(test-org-table/org-table-convert-refs-to-an/1): Provide tests for
table formular format conversion.
-rw-r--r-- | testing/lisp/test-org-table.el | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/lisp/test-org-table.el b/testing/lisp/test-org-table.el new file mode 100644 index 0000000..e2501b3 --- /dev/null +++ b/testing/lisp/test-org-table.el @@ -0,0 +1,56 @@ +;;; test-org-table.el + +;; Copyright (c) ߛ David Maus +;; Authors: David Maus + +;; Released under the GNU General Public License version 3 +;; see: http://www.gnu.org/licenses/gpl-3.0.html + +;;;; Comments: + +;; Template test file for Org-mode tests + + +;;; Code: +(let ((load-path (cons (expand-file-name + ".." (file-name-directory + (or load-file-name buffer-file-name))) + load-path))) + (require 'org-test) + (require 'org-test-ob-consts)) + + +;;; Tests +(ert-deftest test-org-table/org-table-convert-refs-to-an/1 () + "Simple reference @1$1." + (should + (string= "A1" (org-table-convert-refs-to-an "@1$1")))) + +(ert-deftest test-org-table/org-table-convert-refs-to-an/2 () + "Self reference @1$1." + (should + (string= "A1 = $0" (org-table-convert-refs-to-an "@1$1 = $0")))) + +(ert-deftest test-org-table/org-table-convert-refs-to-an/3 () + "Remote reference." + (should + (string= "C& = remote(FOO, @@#B&)" (org-table-convert-refs-to-an "$3 = remote(FOO, @@#$2)")))) + +(ert-deftest test-org-table/org-table-convert-refs-to-rc/1 () + "Simple reference @1$1." + (should + (string= "@1$1" (org-table-convert-refs-to-rc "A1")))) + +(ert-deftest test-org-table/org-table-convert-refs-to-rc/2 () + "Self reference $0." + (should + (string= "@1$1 = $0" (org-table-convert-refs-to-rc "A1 = $0")))) + +(ert-deftest test-org-table/org-table-convert-refs-to-rc/3 () + "Remote reference." + (should + (string= "$3 = remote(FOO, @@#$2)" (org-table-convert-refs-to-rc "C& = remote(FOO, @@#B&)")))) + +(provide 'test-org-table) + +;;; test-org-table.el ends here |