Fix some tests
* testing/lisp/test-org-element (test-org-element/link-parser): Remove a test. * testing/lisp/test-org-pcomplete (test-org-pcomplete/keyword): * testing/lisp/test-ox.el (test-org-export/file-uri): Fix tests.
This commit is contained in:
parent
d347d85a15
commit
990fd09ca8
|
@ -1655,14 +1655,6 @@ e^{i\\pi}+1=0
|
||||||
:path
|
:path
|
||||||
(org-element-map (org-element-parse-buffer) 'link
|
(org-element-map (org-element-parse-buffer) 'link
|
||||||
#'identity nil t))))))
|
#'identity nil t))))))
|
||||||
;; ... id link.
|
|
||||||
(should
|
|
||||||
(equal
|
|
||||||
"id"
|
|
||||||
(org-test-with-temp-text "[[id:aaaa]]"
|
|
||||||
(org-element-property
|
|
||||||
:type
|
|
||||||
(org-element-map (org-element-parse-buffer) 'link 'identity nil t)))))
|
|
||||||
;; ... custom-id link.
|
;; ... custom-id link.
|
||||||
(should
|
(should
|
||||||
(equal
|
(equal
|
||||||
|
|
|
@ -43,17 +43,19 @@
|
||||||
(ert-deftest test-org-pcomplete/keyword ()
|
(ert-deftest test-org-pcomplete/keyword ()
|
||||||
"Test keyword and block completion."
|
"Test keyword and block completion."
|
||||||
(should
|
(should
|
||||||
(equal
|
(string-prefix-p
|
||||||
"#+startup: "
|
"#+startup: "
|
||||||
(org-test-with-temp-text "#+start<point>"
|
(org-test-with-temp-text "#+start<point>"
|
||||||
(pcomplete)
|
(pcomplete)
|
||||||
(buffer-string))))
|
(buffer-string))
|
||||||
|
t))
|
||||||
(should
|
(should
|
||||||
(equal
|
(string-prefix-p
|
||||||
"#+begin_center"
|
"#+begin_center"
|
||||||
(org-test-with-temp-text "#+begin_ce<point>"
|
(org-test-with-temp-text "#+begin_ce<point>"
|
||||||
(pcomplete)
|
(pcomplete)
|
||||||
(buffer-string)))))
|
(buffer-string))
|
||||||
|
t)))
|
||||||
|
|
||||||
(provide 'test-org-pcomplete)
|
(provide 'test-org-pcomplete)
|
||||||
;;; test-org-pcomplete.el ends here
|
;;; test-org-pcomplete.el ends here
|
||||||
|
|
|
@ -3232,8 +3232,9 @@ Another text. (ref:text)
|
||||||
"Test `org-export-file-uri' specifications."
|
"Test `org-export-file-uri' specifications."
|
||||||
;; Preserve relative filenames.
|
;; Preserve relative filenames.
|
||||||
(should (equal "relative.org" (org-export-file-uri "relative.org")))
|
(should (equal "relative.org" (org-export-file-uri "relative.org")))
|
||||||
;; Local files start with "file:///"
|
;; Local files start with "file://"
|
||||||
(should (equal "file:///local.org" (org-export-file-uri "/local.org")))
|
(should (equal (concat "file://" (expand-file-name "/local.org"))
|
||||||
|
(org-export-file-uri "/local.org")))
|
||||||
;; Remote files start with "file://"
|
;; Remote files start with "file://"
|
||||||
(should (equal "file://myself@some.where:papers/last.pdf"
|
(should (equal "file://myself@some.where:papers/last.pdf"
|
||||||
(org-export-file-uri "/myself@some.where:papers/last.pdf")))
|
(org-export-file-uri "/myself@some.where:papers/last.pdf")))
|
||||||
|
|
Loading…
Reference in New Issue