rework fix in82599d37e1 to use should-error macro

* testing/lisp/test-org-table.el: Use `should-error' instead of
  `condition-case' as that is what ERT provides for these sort of
  tests.
This commit is contained in:
Achim Gratz 2015-01-25 11:15:10 +01:00
parent 6b24ffdad9
commit ee01a70adb

View file

@ -1674,25 +1674,21 @@ is t, then new columns should be added as needed"
(let ((org-table-formula-create-columns nil)) (let ((org-table-formula-create-columns nil))
;; need condition-case to trap the out-of-bounds user-error (should-error
(condition-case (org-test-table-target-expect
nil "
(org-test-table-target-expect
"
| 2 | | 2 |
| 4 | | 4 |
| 8 | | 8 |
" "
" "
| 2 | | 2 |
| 4 | | 4 |
| 8 | | 8 |
" "
1 1
"#+TBLFM: @1$2=5") "#+TBLFM: @1$2=5")
('user-error t) :type (list 'error 'user-error)))
;; Older Emacsen will throw an 'error instead of 'user-error.
('error t)))
(let ((org-table-formula-create-columns t)) (let ((org-table-formula-create-columns t))