diff options
| author | Mekeor Melire | 2023-12-04 16:37:37 +0100 |
|---|---|---|
| committer | Eli Zaretskii | 2024-01-27 12:18:17 +0200 |
| commit | 756daa93b3ef7ce33e741ab30000fa397fcd9783 (patch) | |
| tree | a786173c459d98118abe77156296205b2ab62491 /test | |
| parent | 09cdf8a406c5b73e8924a7396c2aaabe74a1a638 (diff) | |
| download | emacs-756daa93b3ef7ce33e741ab30000fa397fcd9783.tar.gz emacs-756daa93b3ef7ce33e741ab30000fa397fcd9783.zip | |
Add option Info-url-alist
* lisp/info.el (Info-url-alist): New option mapping manuals
to URLs.
(Info-url-for-node): Use it.
* test/lisp/info-tests.el (test-info-urls): Add more tests.
In particular, 'Info-url-for-node' should error when
manual-name is not handled in 'Info-url-alist'.
* etc/NEWS: Announce the change. (Bug#67615)
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/info-tests.el | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/test/lisp/info-tests.el b/test/lisp/info-tests.el index ebe718167bf..0dfdbf417e8 100644 --- a/test/lisp/info-tests.el +++ b/test/lisp/info-tests.el | |||
| @@ -29,11 +29,17 @@ | |||
| 29 | 29 | ||
| 30 | (ert-deftest test-info-urls () | 30 | (ert-deftest test-info-urls () |
| 31 | (should (equal (Info-url-for-node "(emacs)Minibuffer") | 31 | (should (equal (Info-url-for-node "(emacs)Minibuffer") |
| 32 | "https://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer.html")) | 32 | "https://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer")) |
| 33 | (should (equal (Info-url-for-node "(emacs)Minibuffer File") | 33 | (should (equal (Info-url-for-node "(emacs)Minibuffer File") |
| 34 | "https://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer-File.html")) | 34 | "https://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer-File")) |
| 35 | (should (equal (Info-url-for-node "(elisp)Backups and Auto-Saving") | 35 | (should (equal (Info-url-for-node "(elisp)Backups and Auto-Saving") |
| 36 | "https://www.gnu.org/software/emacs/manual/html_node/elisp/Backups-and-Auto_002dSaving.html")) | 36 | "https://www.gnu.org/software/emacs/manual/html_node/elisp/Backups-and-Auto_002dSaving")) |
| 37 | (should-error (Info-url-for-node "(gnus)Minibuffer File"))) | 37 | (should (equal (Info-url-for-node "(eintr)car & cdr") |
| 38 | "https://www.gnu.org/software/emacs/manual/html_node/eintr/car-_0026-cdr")) | ||
| 39 | (should (equal (Info-url-for-node "(emacs-mime)\tIndex") | ||
| 40 | "https://www.gnu.org/software/emacs/manual/html_node/emacs-mime/Index")) | ||
| 41 | (should (equal (Info-url-for-node "(gnus) Don't Panic") | ||
| 42 | "https://www.gnu.org/software/emacs/manual/html_node/gnus/Don_0027t-Panic")) | ||
| 43 | (should-error (Info-url-for-node "(nonexistent)Example"))) | ||
| 38 | 44 | ||
| 39 | ;;; info-tests.el ends here | 45 | ;;; info-tests.el ends here |