1 ;;; test-org-pcomplete.el --- test pcomplete integration
3 ;; Copyright (C) 2015-2016 Alexey Lebedeff
4 ;; Authors: Alexey Lebedeff
6 ;; This file is not part of GNU Emacs.
8 ;; This program is free software; you can redistribute it and/or modify
9 ;; it under the terms of the GNU General Public License as published by
10 ;; the Free Software Foundation, either version 3 of the License, or
11 ;; (at your option) any later version.
13 ;; This program is distributed in the hope that it will be useful,
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;; GNU General Public License for more details.
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
27 (ert-deftest test-org-pcomplete
/prop
()
28 "Test property completion."
29 ;; Drawer where we are currently completing property name is
30 ;; malformed in any case, it'll become valid only after successful
31 ;; completion. We expect that this completion process will finish
32 ;; successfully, and there will be no interactive drawer repair
36 "* a\n:PROPERTIES:\n:pname: \n:END:\n* b\n:PROPERTIES:\n:pname: pvalue\n:END:\n"
37 (org-test-with-temp-text "* a\n:PROPERTIES:\n:pna<point>\n:END:\n* b\n:PROPERTIES:\n:pname: pvalue\n:END:\n"
38 (cl-letf (((symbol-function 'y-or-n-p
)
39 (lambda (_) (error "Should not be called"))))
43 (ert-deftest test-org-pcomplete
/keyword
()
44 "Test keyword and block completion."
48 (org-test-with-temp-text "#+start<point>"
55 (org-test-with-temp-text "#+begin_ce<point>"
60 (provide 'test-org-pcomplete
)
61 ;;; test-org-pcomplete.el ends here