diff options
Diffstat (limited to 'test/lisp')
-rw-r--r-- | test/lisp/ffap-tests.el | 13 |
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 @@ ;;; Code: +(require 'cl-lib) (require 'ert) (require 'ffap) @@ -66,6 +67,18 @@ Host = example.com\n") (let ((ffap-gopher-regexp nil)) (should-not (ffap-gopher-at-point))))) +(ert-deftest ffap-other-window--bug-25352 () + "Test for Bug#25352. Checks that the window configuration is +left alone when opening a URL in an external browser." + (cl-letf* ((old (current-window-configuration)) + ((symbol-function 'ffap-prompter) + (lambda () "http://www.gnu.org")) + (urls nil) + (ffap-url-fetcher (lambda (url) (push url urls) nil))) + (should-not (ffap-other-window)) + (should (equal (current-window-configuration) old)) + (should (equal urls '("http://www.gnu.org"))))) + (provide 'ffap-tests) ;;; ffap-tests.el ends here |