diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index 39db5bf..7ebac61 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -362,6 +362,19 @@ (end-of-line) (org-auto-fill-function) (buffer-string)))))) + ;; Correctly fill the caption. + (should + (equal "#+CAPTION: this is a very very\n#+CAPTION: long caption" + (org-test-with-temp-text "#+CAPTION: this is a very very long caption" + (let ((fill-column 30)) + (org-fill-paragraph) + (buffer-string))))) + (should + (equal "#+CAPTION: this is a very short caption" + (org-test-with-temp-text #+CAPTION: this is a very \n#+CAPTION: short caption" + (let ((fill-column 80)) + (org-fill-paragraph) + (buffer-string)))))