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.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/lisp/ffap-tests.el b/test/lisp/ffap-tests.el
index 1ba5f86a887..a3fe3502461 100644
--- a/test/lisp/ffap-tests.el
+++ b/test/lisp/ffap-tests.el
@@ -49,6 +49,23 @@ index 3d7cebadcf..ad4b70d737 100644
(should (equal '(1 1) ffap-string-at-point-region)))))
(and (file-exists-p file) (delete-file file)))))
+(ert-deftest ffap-gopher-at-point ()
+ (with-temp-buffer
+ (insert "\
+Type = 1
+Name = foo
+Path = /the/path
+Port = 7070
+Host = example.com\n")
+ (should-not (ffap-gopher-at-point))
+ (goto-char (point-min))
+ (should (equal (ffap-gopher-at-point)
+ "gopher://example.com:7070/1/the/path"))
+ (should (equal ffap-string-at-point-region
+ (list (point-min) (point-max))))
+ (let ((ffap-gopher-regexp nil))
+ (should-not (ffap-gopher-at-point)))))
+
(provide 'ffap-tests)
;;; ffap-tests.el ends here