diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/ffap-tests.el | 17 |
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 | |||
| 49 | (should (equal '(1 1) ffap-string-at-point-region))))) | 49 | (should (equal '(1 1) ffap-string-at-point-region))))) |
| 50 | (and (file-exists-p file) (delete-file file))))) | 50 | (and (file-exists-p file) (delete-file file))))) |
| 51 | 51 | ||
| 52 | (ert-deftest ffap-gopher-at-point () | ||
| 53 | (with-temp-buffer | ||
| 54 | (insert "\ | ||
| 55 | Type = 1 | ||
| 56 | Name = foo | ||
| 57 | Path = /the/path | ||
| 58 | Port = 7070 | ||
| 59 | Host = example.com\n") | ||
| 60 | (should-not (ffap-gopher-at-point)) | ||
| 61 | (goto-char (point-min)) | ||
| 62 | (should (equal (ffap-gopher-at-point) | ||
| 63 | "gopher://example.com:7070/1/the/path")) | ||
| 64 | (should (equal ffap-string-at-point-region | ||
| 65 | (list (point-min) (point-max)))) | ||
| 66 | (let ((ffap-gopher-regexp nil)) | ||
| 67 | (should-not (ffap-gopher-at-point))))) | ||
| 68 | |||
| 52 | (provide 'ffap-tests) | 69 | (provide 'ffap-tests) |
| 53 | 70 | ||
| 54 | ;;; ffap-tests.el ends here | 71 | ;;; ffap-tests.el ends here |