From 990fd09ca86ef9bd6c64060d8cd668c80ed7ad9e Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 13 Feb 2017 17:14:38 +0100 Subject: [PATCH] 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. --- testing/lisp/test-org-element.el | 8 -------- testing/lisp/test-org-pcomplete.el | 10 ++++++---- testing/lisp/test-ox.el | 5 +++-- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el index 8652aade6..c8c35284f 100644 --- a/testing/lisp/test-org-element.el +++ b/testing/lisp/test-org-element.el @@ -1655,14 +1655,6 @@ e^{i\\pi}+1=0 :path (org-element-map (org-element-parse-buffer) 'link #'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. (should (equal diff --git a/testing/lisp/test-org-pcomplete.el b/testing/lisp/test-org-pcomplete.el index 064cd4fe3..56f7185e5 100644 --- a/testing/lisp/test-org-pcomplete.el +++ b/testing/lisp/test-org-pcomplete.el @@ -43,17 +43,19 @@ (ert-deftest test-org-pcomplete/keyword () "Test keyword and block completion." (should - (equal + (string-prefix-p "#+startup: " (org-test-with-temp-text "#+start" (pcomplete) - (buffer-string)))) + (buffer-string)) + t)) (should - (equal + (string-prefix-p "#+begin_center" (org-test-with-temp-text "#+begin_ce" (pcomplete) - (buffer-string))))) + (buffer-string)) + t))) (provide 'test-org-pcomplete) ;;; test-org-pcomplete.el ends here diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el index 7a23b1dc4..cfcf05e08 100644 --- a/testing/lisp/test-ox.el +++ b/testing/lisp/test-ox.el @@ -3232,8 +3232,9 @@ Another text. (ref:text) "Test `org-export-file-uri' specifications." ;; Preserve relative filenames. (should (equal "relative.org" (org-export-file-uri "relative.org"))) - ;; Local files start with "file:///" - (should (equal "file:///local.org" (org-export-file-uri "/local.org"))) + ;; Local files start with "file://" + (should (equal (concat "file://" (expand-file-name "/local.org")) + (org-export-file-uri "/local.org"))) ;; Remote files start with "file://" (should (equal "file://myself@some.where:papers/last.pdf" (org-export-file-uri "/myself@some.where:papers/last.pdf")))