summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Drop XEmacs conditional from skeleton testsHEADmasterUlrich Müller9 days1-23/+21
| | | | | | | | | * test/ebuild-mode-tests.el (ebuild-mode-test-skeleton): * test/gentoo-newsitem-mode-tests.el (gentoo-newsitem-test-skeleton): Override pos-visible-in-window-p unconditionally. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Allow fragment identifier in bug regexpUlrich Müller13 days1-1/+6
| | | | | | | | * ebuild-mode.el (ebuild-mode-bug-regexp): Allow a fragment identifier, in order to refer to a specific comment. * test/ebuild-mode-tests.el (ebuild-mode-test-bug-url): Update. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Simplify test code for skeleton functionsUlrich Müller2024-11-061-20/+15
| | | | | | | | | | | | * test/ebuild-mode-tests.el (ebuild-mode-test-skeleton): * test/glep-mode-tests.el (glep-mode-test-skeleton): * test/gentoo-newsitem-mode-tests.el (gentoo-newsitem-test-skeleton): * test/devbook-mode-tests.el (devbook-mode-test-skeleton): Move variable and function for test input into the cl-letf* form and delete them from global scope. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Delete XEmacs 21.4 compatibility codeUlrich Müller2024-11-041-5/+5
| | | | | | | | | * ebuild-mode.el (ebuild-mode-get-completion-function): (ebuild-mode-get-keywords, ebuild-mode-unescape-string): * test/ebuild-mode-tests.el (ebuild-mode-test-unescape-string): Delete XEmacs 21.4 compatibility code. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Delete XEmacs 21.4 compat function for format-time-stringUlrich Müller2024-11-041-12/+3
| | | | | | | | | | | | | | | * ebuild-mode.el (ebuild-mode-time-string): Delete compatibility function for XEmacs 21.4. (ebuild-mode-update-copyright, ebuild-mode-insert-skeleton) (ebuild-mode-insert-tag-line): Update all callers. * gentoo-newsitem-mode.el (gentoo-newsitem-insert-skeleton): * glep-mode.el (glep-mode-update-last-modified) (glep-mode-insert-skeleton): Update all callers. * test/ebuild-mode-tests.el (ebuild-mode-test-run-with-fixed-time): Update macro. (ebuild-mode-test-time-string): Delete test. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Add comment in testsUlrich Müller2024-10-241-0/+1
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Avoid e as variable nameUlrich Müller2024-10-141-4/+4
| | | | | | | | * ebuild-mode.el: * test/ebuild-mode-tests.el: Avoid e as variable name because some Emacs versions define it as a global constant for Euler's number. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Do not let-bind special variablesUlrich Müller2024-10-121-14/+14
| | | | | | | | | | | | | * ebuild-mode.el (ebuild-mode-tabify): Do not let-bind tabify-regexp because it is a special variable. (ebuild-run-command): Ditto for shell-command. * ebuild-mode.el: * glep-mode.el: * test/ebuild-mode-tests.el: Use unhyphenated names for lexical variables throughout, in order not to accidentally override any special variables. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* New test for font-lock keywordsUlrich Müller2024-10-081-14/+33
| | | | | | | | | | * ebuild-mode.el (ebuild-mode-collect-and-split): Preserve order. (ebuild-mode-font-lock-keywords): Add docstring. * test/ebuild-mode-tests.el (ebuild-mode-test-collect-and-split): Update. (ebuild-mode-test-font-lock-keywords): New test. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Fix a byte-compiler warning in testsUlrich Müller2024-10-021-7/+6
| | | | | | | | * test/ebuild-mode-tests.el (ebuild-mode-test-run-with-fixed-time): * test/glep-mode-tests.el (glep-mode-test-run-with-fixed-time): Use func-arity to detect the calling convention for encode-time. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Fix some byte-compiler warnings in testsUlrich Müller2024-10-021-11/+9
| | | | | | | | | | | | | * test/ebuild-mode-tests.el (cl-letf, cl-letf*): Enclose their definition in eval-when-compile. (ebuild-mode-test-font-lock): Call font-lock-fontify-region instead of font-lock-fontify-buffer. This is silent and also avoids the noninteractive trickery. * test/gentoo-newsitem-mode-tests.el (cl-letf, cl-letf*) (gentoo-newsitem-mode-test-font-lock): Ditto. (gentoo-newsitem-mode-test-run-silently): Remove. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Remove unnecessary *-run-silently wrappers in testsUlrich Müller2024-10-021-7/+6
| | | | | | | | | | * test/ebuild-mode-tests.el (ebuild-mode-test-skeleton): Remove unnecessary ebuild-mode-test-run-silently. * test/gentoo-newsitem-mode-tests.el (gentoo-newsitem-mode-test-skeleton): Remove unnecessary gentoo-newsitem-mode-test-run-silently. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Drop redundant XEmacs conditionals in testsUlrich Müller2024-10-021-8/+6
| | | | | | | | * test/ebuild-mode-tests.el: * test/gentoo-newsitem-mode-tests.el: Drop redundant XEmacs conditionals. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Enable bug-reference-prog-mode in ebuild-repo-modeUlrich Müller2024-10-021-0/+25
| | | | | | | | | | | * ebuild-mode.el (ebuild-mode-enable-bug-reference): New custom variable. (ebuild-mode-bug-regexp, ebuild-mode-bug-url-format): New variables. (ebuild-repo-mode): Conditionally enable bug-reference-prog-mode. * test/ebuild-mode-tests.el (ebuild-mode-test-bug-url): New test. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Update ebuild-mode-time-string testUlrich Müller2024-09-251-6/+4
| | | | | | | * test/ebuild-mode-tests.el (ebuild-mode-test-time-string): Run with fixed time. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Fix test for ebuild-mode-update-copyrightUlrich Müller2024-09-101-0/+1
| | | | | | | * test/ebuild-mode-tests.el (ebuild-mode-test-update-copyright): Actually run ebuild-mode-update-copyright. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Avoid date-to-time in testsUlrich Müller2024-08-291-1/+6
| | | | | | | | | * test/ebuild-mode-tests.el (ebuild-mode-test-run-with-fixed-time): * test/glep-mode-tests.el (glep-mode-test-run-with-fixed-time): Use encode-time instead of date-to-time. Bug 938666. Bug: https://bugs.gentoo.org/938666 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* More testsUlrich Müller2024-08-281-0/+57
| | | | | | | | | | | | | | | * test/ebuild-mode-tests.el (ebuild-mode-test-input): New variable and function. (ebuild-mode-test-skeleton, ebuild-mode-test-keybindings): New tests. * test/glep-mode-tests.el (glep-mode-test-input): New variable and function. (glep-mode-test-skeleton, glep-mode-test-keybindings): New tests. * test/gentoo-newsitem-mode-tests.el: * test/devbook-mode-tests.el: New files. * Makefile (TESTS): Add them. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Make the tests work with XEmacsUlrich Müller2024-08-271-14/+35
| | | | | | | | | | | | | | | | * test/ebuild-mode-tests.el (cl-letf, cl-letf*) (ebuild-mode-test-run-with-fixed-time) (ebuild-mode-test-run-silently, ebuild-mode-test-font-lock) (ebuild-mode-test-unescape-string): Portability fixes for XEmacs. * test/glep-mode-tests.el (glep-mode-test-run-with-fixed-time): Sync from ebuild-mode-test-run-with-fixed-time. * test/xemacs-test-wrapper.el: New file. * Makefile (DISTFILES): Add xemacs-test-wrapper.el. (ELCS, TESTS): Include only files that are actually supported by the Emacs version. (check): Make it work with XEmacs. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Optimise font-lock keyword collectionUlrich Müller2024-08-211-7/+10
| | | | | | | | | * ebuild-mode.el (ebuild-mode-collect-and-split): Don't copy the element when creating a cons cell is enough. * test/ebuild-mode-tests.el (ebuild-mode-test-collect-and-split): Update. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Move binding of format-time-string to a macroUlrich Müller2024-08-101-30/+36
| | | | | | | | | | | | * test/ebuild-mode-tests.el (ebuild-mode-test-run-with-fixed-time): New macro. (ebuild-mode-test-update-copyright) (ebuild-mode-test-insert-tag-line): Use it. * test/glep-mode-tests.el (glep-mode-test-run-with-fixed-time): New macro. (glep-mode-test-update-last-modified): Use it. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Add some testsUlrich Müller2024-08-081-0/+195
* test/ebuild-mode-tests.el: * test/glep-mode-tests.el: New files, introducing tests. * ebuild-mode.el (ebuild-mode-collect-and-split): Make it visible at load time for tests. * Makefile (TESTS, BYTECOMPFLAGS): New variables. (check): New target. Signed-off-by: Ulrich Müller <ulm@gentoo.org>