Remove duplicate test

* testing/lisp/test-org-table.el (test-org-table/align): Remove test.
This commit is contained in:
Nicolas Goaziou 2017-09-08 13:11:25 +02:00
parent 289539e119
commit 17013d6f38
1 changed files with 21 additions and 34 deletions

View File

@ -154,40 +154,6 @@
;; Lisp formula ;; Lisp formula
"#+TBLFM: @>$1 = '(+ @I..@>>); N :: $2 = '(* 2 $1); N")) "#+TBLFM: @>$1 = '(+ @I..@>>); N :: $2 = '(* 2 $1); N"))
(ert-deftest test-org-table/align ()
"Align columns within Org buffer, depends on `org-table-number-regexp'."
(org-test-table-target-expect "
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| ab | 12 | 12.2 | 2.4e-08 | 2x10^12 | 4.034+-0.02 | 2.7(10) | >3.5 |
| ab | ab | ab | ab | ab | ab | ab | ab |
")
(org-test-table-target-expect "
| 0 | 0 | 0 | 0 | 0 | 0 |
| <-0x0ab.cf | >-36#0vw.yz | nan | uinf | -inf | inf |
| 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 |
")
(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 " (defconst references/target-normal "
| 0 | 1 | replace | replace | replace | replace | replace | replace | | 0 | 1 | replace | replace | replace | replace | replace | replace |
| z | 1 | replace | replace | replace | replace | replace | replace | | z | 1 | replace | replace | replace | replace | replace | replace |
@ -1692,6 +1658,27 @@ See also `test-org-table/copy-field'."
(let ((org-table-number-fraction 0.5)) (org-table-align)) (let ((org-table-number-fraction 0.5)) (org-table-align))
(buffer-string))))) (buffer-string)))))
(ert-deftest test-org-table/align-buffer-tables ()
"Align all tables when updating buffer."
(let ((before "
| a b |
| c d |
")
(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))))
;;; Sorting ;;; Sorting