Browse Source

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.
Marco Wahl 5 years ago
parent
commit
dc53b59a25
1 changed files with 10 additions and 0 deletions
  1. 10 0
      testing/lisp/test-org-table.el

+ 10 - 0
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