summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brand <michael.ch.brand@gmail.com>2016-10-21 17:33:13 +0200
committerMichael Brand <michael.ch.brand@gmail.com>2016-10-21 17:33:13 +0200
commite66298dfd9c1d1288441d6cd1c47da72b9325028 (patch)
tree039ccbc92478b6fe92e4f894c67ff40754d1cc9f
parented86b1aa3cfdfdcf4295cb14e4565c1b234c109e (diff)
downloadorg-mode-e66298dfd9c1d1288441d6cd1c47da72b9325028.tar.gz
Add test for table alignment
* testing/lisp/test-org-table.el (test-org-table/align-buffer-tables): New test to document current behavior.
-rw-r--r--testing/lisp/test-org-table.el22
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/lisp/test-org-table.el b/testing/lisp/test-org-table.el
index 712273c..bd8437f 100644
--- a/testing/lisp/test-org-table.el
+++ b/testing/lisp/test-org-table.el
@@ -167,6 +167,28 @@
| ab | ab | ab | ab | ab | ab |
"))
+(ert-deftest test-org-table/align-buffer-tables ()
+ "Align all tables when updating buffer."
+ (let ((before "
+| a b |
+
+| c d |
+")
+ ;; FIXME: Tables should be aligned.
+ (after "
+| a b |
+
+| c d |
+"))
+ (should (equal (org-test-with-temp-text before
+ (org-table-recalculate-buffer-tables)
+ (buffer-string))
+ after))
+ (should (equal (org-test-with-temp-text before
+ (org-table-iterate-buffer-tables)
+ (buffer-string))
+ after))))
+
(defconst references/target-normal "
| 0 | 1 | replace | replace | replace | replace | replace | replace |
| z | 1 | replace | replace | replace | replace | replace | replace |