mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-24 21:02:51 +00:00
testing: Re-introduce more useful new tests instead of deleted dupllicates
* testing/lisp/test-ol.el (test-org-link/store-link): * testing/lisp/test-org-table.el (test-org-table/get-field): * testing/lisp/test-org.el (test-org/auto-fill-function): Add modified version of the removed test duplicates, according to their likely original intention. Link: https://orgmode.org/list/87cz0wyw9m.fsf@localhost
This commit is contained in:
parent
fe85d61a92
commit
173b5de0ec
|
@ -301,6 +301,14 @@ See https://github.com/yantar92/org/issues/4."
|
|||
(let ((file (buffer-file-name)))
|
||||
(equal (format "[[file:%s::two]]" file file)
|
||||
(org-store-link nil))))))
|
||||
(should
|
||||
(let ((org-stored-links nil)
|
||||
(org-context-in-file-links t))
|
||||
(org-test-with-temp-text-in-file "#two"
|
||||
(fundamental-mode)
|
||||
(let ((file (buffer-file-name)))
|
||||
(equal (format "[[file:%s::two]]" file file)
|
||||
(org-store-link nil))))))
|
||||
(should
|
||||
(let ((org-stored-links nil)
|
||||
(org-context-in-file-links t))
|
||||
|
|
|
@ -3368,6 +3368,11 @@ See also `test-org-table/copy-field'."
|
|||
(org-test-with-temp-text "| 1 | 2 | 3 |"
|
||||
(org-table-get-field 3 " foo ")
|
||||
(buffer-string))))
|
||||
(should
|
||||
(equal " foo "
|
||||
(org-test-with-temp-text "| 1 | 2 |\n<point>| 3 | 4 |"
|
||||
(org-table-get-field 2 " foo ")
|
||||
(org-table-get-field 2))))
|
||||
;; An empty REPLACE string clears the field.
|
||||
(should
|
||||
(equal "| |"
|
||||
|
|
|
@ -1025,6 +1025,15 @@ Otherwise, evaluate RESULT as an sexp and return its result."
|
|||
(end-of-line 3)
|
||||
(org-auto-fill-function)
|
||||
(buffer-string)))))
|
||||
;; Do not fill VERSE blocks.
|
||||
(should-not
|
||||
(equal "#+BEGIN_VERSE\n12345\n7890\n#+END_VERSE"
|
||||
(org-test-with-temp-text "#+BEGIN_VERSE\n12345 7890\n#+END_VERSE"
|
||||
(let ((fill-column 5))
|
||||
(forward-line)
|
||||
(end-of-line)
|
||||
(org-auto-fill-function)
|
||||
(buffer-string)))))
|
||||
;; Comment block: auto fill contents.
|
||||
(should
|
||||
(equal "#+BEGIN_COMMENT\n12345\n7890\n#+END_COMMENT"
|
||||
|
|
Loading…
Reference in a new issue