aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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 827d751be69..1862c6c3277 100644
--- a/test/lisp/ffap-tests.el
+++ b/test/lisp/ffap-tests.el
@@ -23,6 +23,7 @@
23 23
24;;; Code: 24;;; Code:
25 25
26(require 'cl-lib)
26(require 'ert) 27(require 'ert)
27(require 'ffap) 28(require 'ffap)
28 29
@@ -66,6 +67,18 @@ Host = example.com\n")
66 (let ((ffap-gopher-regexp nil)) 67 (let ((ffap-gopher-regexp nil))
67 (should-not (ffap-gopher-at-point))))) 68 (should-not (ffap-gopher-at-point)))))
68 69
70(ert-deftest ffap-other-window--bug-25352 ()
71 "Test for Bug#25352. Checks that the window configuration is
72left alone when opening a URL in an external browser."
73 (cl-letf* ((old (current-window-configuration))
74 ((symbol-function 'ffap-prompter)
75 (lambda () "http://www.gnu.org"))
76 (urls nil)
77 (ffap-url-fetcher (lambda (url) (push url urls) nil)))
78 (should-not (ffap-other-window))
79 (should (equal (current-window-configuration) old))
80 (should (equal urls '("http://www.gnu.org")))))
81
69(provide 'ffap-tests) 82(provide 'ffap-tests)
70 83
71;;; ffap-tests.el ends here 84;;; ffap-tests.el ends here