summaryrefslogtreecommitdiff
path: root/test/lisp/ffap-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/ffap-tests.el')
-rw-r--r--test/lisp/ffap-tests.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/lisp/ffap-tests.el b/test/lisp/ffap-tests.el
index 825ed8ba139..6860ac28c45 100644
--- a/test/lisp/ffap-tests.el
+++ b/test/lisp/ffap-tests.el
@@ -311,6 +311,19 @@ End of search list.
(delete-file test-file)
(should (equal (ffap-file-at-point) default-directory)))))
+(ert-deftest ffap-respects-confirm-nonexistent-file-or-buffer ()
+ (let ((default-directory temporary-file-directory)
+ (file1 (make-temp-file "ffap-test-foo1"))
+ (file2 (make-temp-file "ffap-test-foo2")))
+ (minibuffer-with-setup-hook
+ (lambda ()
+ (execute-kbd-macro (kbd "ffap- TAB RET"))
+ (should (equal (expand-file-name "ffap-test-foo") (minibuffer-contents)))
+ (should (equal major-mode 'minibuffer-mode))
+ (delete-file file1)
+ (delete-file file2))
+ (let ((executing-kbd-macro t)) (find-file-at-point)))))
+
(provide 'ffap-tests)
;;; ffap-tests.el ends here