From e66298dfd9c1d1288441d6cd1c47da72b9325028 Mon Sep 17 00:00:00 2001 From: Michael Brand Date: Fri, 21 Oct 2016 17:33:13 +0200 Subject: [PATCH] Add test for table alignment * testing/lisp/test-org-table.el (test-org-table/align-buffer-tables): New test to document current behavior. --- testing/lisp/test-org-table.el | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/testing/lisp/test-org-table.el b/testing/lisp/test-org-table.el index 712273cc6..bd8437f69 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 | -- 2.11.4.GIT