summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Wahl <marcowahlsoft@gmail.com>2020-03-30 23:21:45 +0200
committerMarco Wahl <marcowahlsoft@gmail.com>2020-03-30 23:21:45 +0200
commitdc53b59a2562dd024646d0a20607b6ea36fe7abc (patch)
treed8a3b5b5ceefdf8447c8407e1ae2b13a2a86c8c5
parentfe34a408f24948ccbe936fdf734ba4110b957e3e (diff)
downloadorg-mode-dc53b59a2562dd024646d0a20607b6ea36fe7abc.tar.gz
test-org-table: Test insert column with formula in place
* testing/lisp/test-org-table.el (test-org-table/insert-column-with-formula): New test.
-rw-r--r--testing/lisp/test-org-table.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/testing/lisp/test-org-table.el b/testing/lisp/test-org-table.el
index 565f3ff..14094de 100644
--- a/testing/lisp/test-org-table.el
+++ b/testing/lisp/test-org-table.el
@@ -2394,6 +2394,16 @@ See also `test-org-table/copy-field'."
(org-table-insert-column)
(buffer-string)))))
+(ert-deftest test-org-table/insert-column-with-formula ()
+ "Test `org-table-insert-column' with a formula in place."
+ (should
+ (equal "| 1 | | 1 | 2 |
+#+TBLFM: $4=$1+$3"
+ (org-test-with-temp-text
+ "| 1<point> | 1 | 2 |
+#+TBLFM: $3=$1+$2"
+ (org-table-insert-column)
+ (buffer-substring-no-properties (point-min) (point-max))))))
;;; Moving single cells