summaryrefslogtreecommitdiff
path: root/test/lisp
Commit message (Collapse)AuthorAgeFilesLines
* * test/lisp/org/org-tests.el: Use lexical-binding.Stefan Kangas2020-09-101-1/+1
|
* Use lexical-binding in url-future-tests.elStefan Kangas2020-09-101-11/+13
| | | | | | * test/lisp/url/url-future-tests.el: Use lexical-binding. (url-future-tests--saver): New variable. (url-future-tests): Use new variable.
* Use lexical-binding in semantic-utest-c.elStefan Kangas2020-09-101-28/+29
| | | | | * test/lisp/cedet/semantic-utest-c.el: Use lexical-binding. (semantic-test-gcc-output-parser): Fix warning.
* Implement D-Bus properties with compound type.Michael Albinus2020-09-101-8/+9
| | | | | | | | | | | | | * lisp/net/dbus.el (dbus-set-property): Fix thinko. (dbus-register-property, dbus-property-handler): Support compound properties. * src/dbusbind.c (dbus-registered-objects-table): Fix docstring. * test/lisp/net/dbus-tests.el (dbus--test-interface): Make it different to `dbus--test-service'. (dbus-test05-register-property) (dbus-test05-register-property-several-paths): Adapt tests.
* Add gv-define-expander for plist-getNaoya Yamashita2020-09-091-0/+40
| | | | | | | | | | It is necessary to make plist-get as a generalized variable, and this definition allows user to use setf and other useful functions on plist-get. * lisp/emacs-lisp/gv.el: Add gv-define-expander for plist-get * lisp/emacs-lisp/gv-tests.el: Add new tests for plist-get
* Fix thinko in dbus.elMichael Albinus2020-09-091-11/+32
| | | | | | | | | | * doc/misc/dbus.texi (Register Objects): Rename from "Receiving Method Calls". Add reference to D-Bus API Design document. * lisp/net/dbus.el (dbus-managed-objects-handler): Fix thinko. * test/lisp/net/dbus-tests.el (dbus-test05-register-property) (dbus-test05-register-property-several-paths): Extend tests.
* Use mouse-wheel-up-event in mwheel-tests.elDaniel Martín2020-09-081-2/+2
| | | | | | | | | | Enabling mouse-wheel-mode binds two different mouse events, depending on the operating system. The correct way to check for those events is by checking mouse-wheel-up-event, as explained in the ELisp manual. * test/lisp/mwheel-tests.el (mwheel-test-enable/disable): Check mouse-wheel-up-event instead of mouse-4 to make the test work irrespective of the platform it's running.
* Skip failing cperl test on hydraGlenn Morris2020-09-081-4/+6
| | | | | * test/lisp/progmodes/cperl-mode-tests.el (cperl-mode-test-bug-10483): Skip on hydra.nixos.org.
* Implement typed D-Bus properties (Bug#43252)Michael Albinus2020-09-081-7/+149
| | | | | | | | | | | | | | | | | | | | | | | * doc/misc/dbus.texi (Properties and Annotations) (Receiving Method Call): Document optional type symbol in `dbus-set-property' and `dbus-register-property'. * lisp/net/dbus.el (dbus-error-unknown-interface) (dbus-error-unknown-method, dbus-error-unknown-object) (dbus-error-unknown-property): New defconsts. (dbus-peer-handler): Improve error handling. (dbus-introspect-get-signature): Handle also properties. (dbus-set-property, dbus-register-property): Allow optional TYPE symbol for VALUE. (Bug#43252) (dbus-property-handler): Implement property types. Improve error handling. * src/dbusbind.c (dbus-message-internal, dbus-registered-objects-table): Fix docstring. * test/lisp/net/dbus-tests.el (dbus-test05-register-property): Extend test. (dbus-test05-register-property-several-paths): New test.
* Fix test failure in custom--test-theme-variablesLars Ingebrigtsen2020-09-071-1/+3
| | | | | | | * test/lisp/custom-tests.el (custom--test-theme-variables): "make check" in the main directory didn't work because the path was wrong. Use EMACS_TEST_DIRECTORY to find the test directory instead.
* Require ert in the cperl tests, since it's reloading itselfLars Ingebrigtsen2020-09-071-0/+1
|
* ; Fix typosStefan Kangas2020-09-071-2/+2
|
* More work on D-Bus error messagesMichael Albinus2020-09-061-19/+203
| | | | | | | | | | | | | | | | | | | * lisp/net/dbus.el (dbus-get-property): Adapt docstring. (dbus-set-property): Handle case of `:write' access type. (dbus-get-other-registered-properties): Rename from `dbus-get-other-registered-property'. (dbus-property-handler): Fix thinkos. * src/dbusbind.c (xd_read_message_1): Add error_name to event args in case of DBUS_MESSAGE_TYPE_ERROR. * test/lisp/net/dbus-tests.el (dbus--test-enabled-session-bus) (dbus--test-enabled-system-bus): Make them defconst. (dbus--test-service, dbus--test-path, dbus--test-interface): New defconst. Replace all occurences of `dbus-service-emacs' by `dbus--test-service'. (dbus--test-method-handler): New defun. (dbus-test04-register-method, dbus-test05-register-property): New tests.
* Adapt tramp-test30-make-processMichael Albinus2020-09-051-7/+2
| | | | | | * test/lisp/net/tramp-tests.el (tramp-list-tramp-buffers) (tramp-time-diff): Don't declare. (tramp-test30-make-process): Adapt test.
* Preserve user customizations after disabling a themeMauro Aranda2020-09-051-7/+1
| | | | | | | | | | | | | | | | | | | * lisp/custom.el (enable-theme): Since we are enabling the theme, bind custom--inhibit-theme-enable to nil. Then rely on custom-push-theme to do the right thing with the theme settings and prior user settings, instead of manipulating the property here. This way, when disabling a theme, we restore user preferences, even when the values were changed outside of customize. (disable-theme): Call custom-push-theme instead of handling theme settings directly. (custom-push-theme): Avoid another instance of Bug#28904: we don't need the changed theme when the value recorded for it is going to be the same as the recorded for the user theme. * test/lisp/custom-tests.el (custom--test-theme-variables): Get rid of a portion of the test that will always fail, because the user theme has priority over every other theme. Expect the test to pass now that we preserve user customizations after disabling a theme (bug#34027).
* Fix infloop when indenting in cperl-modeHarald Jörg2020-09-042-4/+139
| | | | | | * lisp/progmodes/cperl-mode.el (cperl-indent-exp): Fix (Bug#10483) Perl expressions (e.g. function calls) ending in ")" without statement terminator on the same line no longer loop endlessly.
* Fix freeze in cperl-mode when editing a regexpHarald Jörg2020-09-031-0/+23
| | | | | | | | | * lisp/progmodes/cperl-mode.el (cperl-forward-group-in-re): Make sure that an error is reported back to the caller (Bug#16368). * test/lisp/progmodes/cperl-mode-tests.el (cperl-mode-test-bug-16368): Tests for balanced (no error) and unbalanced (caught exception) cases of `cperl-forward-group-in-re'.
* ; * test/lisp/progmodes/cperl-mode-tests.el: Add license statement.Stefan Kangas2020-09-031-0/+15
|
* Fix 'expand-file-name' for remote filesEli Zaretskii2020-09-031-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | This reverts most of commit 14fb657ba82da346d36f05f88da26f1c5498b798 and its followup fixes, and instead fixes the original bugs in a different manner that doesn't affect any unrelated use cases. As part of this, the code which caused 'expand-file-name' to enforce a trailing slash on expanded directories is removed, as this kind of semantic processing is outside of 'expand-file-name's scope. * src/fileio.c (Fexpand_file_name): If expanding default_directory yields a remote file name, call its handlers. (Bug#26911) (Bug#34834) * doc/lispref/files.texi (File Name Expansion): Remove the requirement that expanding a directory name yields a directory name, i.e. that the expansion must end in a slash. * etc/NEWS: Remove the announcement of the changed behavior of 'expand-file-name' wrt trailing slashes. * test/src/fileio-tests.el (fileio-tests--HOME-trailing-slash) (fileio-tests--expand-file-name-trailing-slash): Remove tests. * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name): No need to expect different results in Emacs 28 and later.
* Simplify mwheel-mode by using alist instead of two variablesStefan Kangas2020-09-021-0/+6
| | | | | | | | | | | | * lisp/mwheel.el (mouse-wheel--remove-bindings): Update call signature to take no arguments. Doc fix. (mouse-wheel--add-binding): Break out from... (mouse-wheel-mode): ...here. Simplify by using above functions. (mouse-wheel--installed-bindings-alist): New variable. (mwheel-installed-bindings): Make obsolete. (mwheel-installed-text-scale-bindings): Make obsolete. * test/lisp/mwheel-tests.el (mwheel-test-enable/disable): New test.
* Fix binding mouse wheel with modifiers in buffer areaStefan Kangas2020-09-021-9/+11
| | | | | | | | | * test/lisp/mwheel-tests.el (mwheel-test--create-scroll-keys): Fix binding mouse wheel with modifiers in buffer area, while ignoring them for fringes, margins, etc. My previous change mistakenly ignored all modifiers in `mouse-wheel-scroll-amount'. * lisp/mwheel.el (mouse-wheel--create-scroll-keys): Fix test to reflect the above.
* Apply icalendar.el patch by Thomas Plass <thunk2@arcor.de>. Fix bug#34315.Ulf Jasper2020-09-021-9/+9
| | | | | | | | | | | | * lisp/calendar/icalendar.el (icalendar--convert-tz-offset): No DST when RDATE is present. * lisp/calendar/icalendar.el (icalendar--parse-vtimezone): Use `icalendar--get-most-recent-observance'. * (icalendar--get-most-recent-observance): New. * (icalendar--decode-isodatetime): Add parameters source-zone, result-zone. * (icalendar--decode-isoduration): Fix decoding days. * test/lisp/calendar/icalendar-tests.el (icalendar--decode-isoduration): Add testcases.
* Add unit tests for icalendar.elUlf Jasper2020-09-021-4/+126
| | | | | | | * test/lisp/calendar/icalendar-tests.el (icalendar--parse-vtimezone, icalendar--decode-isodatetime): Add testcases. * test/lisp/calendar/icalendar-tests.el (icalendar--convert-tz-offset, icalendar--decode-isoduration): New.
* Use lexical-binding in pcmpl-linux.el and add testsStefan Kangas2020-09-023-0/+62
| | | | | | | | | | | * lisp/pcmpl-linux.el: Use lexical-binding. (pcmpl-linux-fs-modules-path-format) (pcmpl-linux-mtab-file): New constants. (pcmpl-linux-fs-types, pcmpl-linux-mounted-directories): Use above new constants. * test/lisp/pcmpl-linux-resources/fs/ext4/.keep: * test/lisp/pcmpl-linux-resources/mtab: * test/lisp/pcmpl-linux-tests.el: New files.
* Use lexical-binding in life.el and add testsStefan Kangas2020-08-301-0/+80
| | | | | | | | | | * lisp/play/life.el: Use lexical-binding. (life--tick): Extract from... (life): ...here. (life--max-width, life--max-height): New variables. (life-mode, life-setup): Use above variables. * test/lisp/play/life-tests.el: New file.
* Convert manual rmailmm tests to ertStefan Kangas2020-08-301-0/+117
| | | | | * test/manual/rmailmm.el: Move from here... * test/lisp/mail/rmailmm-tests.el: ...to here, and convert to ert.
* Convert unsafep tests to ertStefan Kangas2020-08-291-0/+144
| | | | | | * lisp/emacs-lisp/tcover-unsafep.el: Move from here... * test/lisp/emacs-lisp/unsafep-tests.el: ...to here, and convert to use ert instead of tcover.
* Use lexical-binding in more testsStefan Kangas2020-08-295-6/+8
| | | | | | | | | | | | | | | | | * test/lib-src/emacsclient-tests.el: * test/lisp/emacs-lisp/hierarchy-tests.el: * test/lisp/eshell/eshell-tests.el: * test/lisp/gnus/gnus-util-tests.el: * test/lisp/progmodes/js-tests.el: * test/lisp/textmodes/bibtex-tests.el: * test/src/editfns-tests.el: * test/src/fns-tests.el: Use lexical-binding. * test/lisp/emacs-lisp/hierarchy-tests.el (hierarchy-leafs-includes-lonely-roots): * test/src/editfns-tests.el (transpose-test-get-byte-positions): * test/src/fns-tests.el (fns-tests-func-arity): Adjust for lexical-binding.
* * test/lisp/emacs-lisp/rx-tests.el: Improve test coverage.Mattias Engdegård2020-08-291-4/+9
|
* Add support for parsing column numbers in Visual Studio messagesDaniel Martín2020-08-281-1/+3
| | | | | | | | | | | | | * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Extend regular expression to match optional column numbers. * test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data): Add a test. * test/lisp/progmodes/compile-tests.el (compile-test-error-regexps): Update the total number of compilation errors in a test. * etc/compilation.txt: Update compilation.txt with the newly supported message format. * etc/NEWS: Advertise the feature.
* Fix Bug#43052Michael Albinus2020-08-281-15/+23
| | | | | * test/lisp/net/tramp-tests.el (tramp-test04-substitute-in-file-name): Make user name unique. (Bug#43052)
* Use lexical-binding in warnings.el and add testsStefan Kangas2020-08-281-0/+60
| | | | | | | * lisp/warnings.el: Use lexical-binding. Remove redundant :group args. * test/lisp/warnings-tests.el: New file.
* Adapt tramp-testsMichael Albinus2020-08-271-11/+8
| | | | | * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name) (tramp-test05-expand-file-name-relative): Adapt tests.
* Prevent spurious tabs by RET in todo-edit-mode (bug#43068)Stephen Berman2020-08-272-7/+56
| | | | | | | | | | | | | | | | | | | | * lisp/calendar/todo-mode.el (todo-key-bindings-t) (todo-edit-mode-map): Remove remapping of `newline' to `newline-and-indent'. (todo-modes-set-1): Remove local setting of `indent-line-function'. (todo-edit-mode): Locally set `indent-line-function' to `todo-indent'. * test/lisp/calendar/todo-mode-tests.el (todo-test-move-item05): Prevent interactive test failure. (Until the addition of testcat4 to todo-test-1.todo, the test passed by chance, since testcat3 is empty and has no archived items.) (todo-test-edit-item-date-month): Refer to bug number. (todo-test-multiline-item-indentation-1) (todo-test-multiline-item-indentation-2) (todo-test-multiline-item-indentation-3): New tests. * test/lisp/calendar/todo-mode-resources/todo-test-1.todo: Remove spurious tabs from testcat1.
* ; Fix license statements.Stefan Kangas2020-08-2719-57/+91
|
* Fix expand-file-name symlink-to-dir bugPaul Eggert2020-08-261-7/+4
| | | | | | | | | | | | | | | Problem reported by Yegor Timoshenko (Bug#26911), and I ran into it myself recently in normal-top-level. * doc/lispref/files.texi (File Name Expansion), etc/NEWS: Mention this. * src/fileio.c (Fexpand_file_name): Expand "/a/b/." to "/a/b/" not "/a/b", to avoid misinterpreting a symlink "/a/b". Similarly, expand "/a/b/c/.." to "/a/b/" not "/a/b". * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name): Adjust to match new behavior. (tramp-test05-expand-file-name-relative): This test now succeeds, at least on Fedora 31. * test/src/fileio-tests.el: (fileio-tests--expand-file-name-trailing-slash) New test.
* Fix lexical misunderstandings in gnus-icalendar-tests.el (bug#39782)Mattias Engdegård2020-08-261-14/+6
| | | | | | | | | | | * test/lisp/gnus/gnus-icalendar-tests.el: (icalendar-tests--get-ical-event): Remove unused function accidentally copy-pasted from icalendar-tests.el. (gnus-icalendar-parse, gnus-icalendary-byday): Remove unintended initial newlines. Duplicate comma-escaping backslashes so that they have intended effects, conforming to RFC 5545. Remove ineffective comma-escaping backslashes where not intended.
* Fix gpg2-related test failures on RHEL 7.8Paul Eggert2020-08-251-3/+4
| | | | | | | | | * test/lisp/gnus/mml-sec-tests.el (test-conf) (mml-secure-en-decrypt-passphrase-no-cache-openpgp-todo) (mml-secure-run-tests-with-gpg2): Use epg-find-configuration instead of the obsolescent epg-configuration. This fixes test failures on RHEL 7.8, where ‘gpg’ and ‘gpg2’ are both 2.0.22.
* mml-secure-en-decrypt-sign-1-2-double is unstablePaul Eggert2020-08-251-0/+1
| | | | | * test/lisp/gnus/mml-sec-tests.el: (mml-secure-en-decrypt-sign-1-2-double): Mark this as unstable.
* Merge from origin/emacs-27Michael Albinus2020-08-251-4/+12
|\ | | | | | | | | | | | | | | | | | | 44104a607a Fix error in GMP test e26e63444d Add Feature testing for Windows binaries 4e2caef384 ; * src/character.c (str_as_multibyte): Fix the commentary. d3a4ce8420 Revert "; * etc/NEWS: Remove temporary note on documentati... 16f00e36dc * admin/admin.el (set-version): Trap yet another NEWS error. 121be3e118 ; * etc/NEWS: Remove temporary note on documentation. (Bu... 5fcb97dabd Fix cond jump table compilation (bug#42919)
| * Fix cond jump table compilation (bug#42919)Mattias Engdegård2020-08-191-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug affected compilation of (cond ((member '(some list) variable) ...) ...) While equal is symmetric, member is not; in the latter case the arguments must be a variable and a constant list, in that order. Reported by Ikumi Keita. * lisp/emacs-lisp/bytecomp.el (byte-compile--cond-switch-prefix): Don't treat equality and member predicates in the same way; only the former are symmetric in their arguments. * test/lisp/emacs-lisp/bytecomp-tests.el (byte-opt-testsuite-arith-data): Add test cases.
* | Add sanity check in tramp-sh-get-signal-stringsMichael Albinus2020-08-241-14/+14
| | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-sh.el (tramp-sh-get-signal-strings): Add sanity check. * test/lisp/net/tramp-tests.el (tramp-test28-process-file): Remove instrumentation. (tramp--test--deftest-direct-async-process): Adapt docstring. (tramp--test-windows-nt-p, tramp--test-windows-nt-and-batch-p): Rename from `tramp--test-windows-nt', `tramp--test-windows-nt-and-batch'.
* | Rework direct async processes in TrampMichael Albinus2020-08-231-62/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Remote processes): Precise restrictions for direct async processes. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-direct-async-process-p): Make it more precise. (tramp-handle-make-process): Rewrite, based on `make-process'. * test/lisp/net/tramp-tests.el (tramp-test-temporary-file-directory): Add `tramp-direct-async-args` for mock method. (tramp-test29-start-file-process, tramp-test30-make-process): Use weaker regexp checking "foo". (tramp-test30-make-process): Do not check stderr for direct async processes. (tramp--test--deftest-direct-async-process): New defmacro. (tramp-test29-start-file-process-direct-async) (tramp-test30-make-process-direct-async): New tests.
* | ; * test/lisp/net/tramp-tests.el (tramp-test28-process-file): Instrument test.Michael Albinus2020-08-231-1/+2
| |
* | Bind the time zone so that the tests work everywhereLars Ingebrigtsen2020-08-221-16/+29
| |
* | ; Copyright fixGlenn Morris2020-08-221-4/+6
| | | | | | | | Author has assignment
* | gnus-icalendar does not understand multiple repeating daysJan Tatarik2020-08-221-0/+229
| | | | | | | | | | | | | | | | * lisp/gnus/gnus-icalendar.el (gnus-icalendar-event:recurring-days): New function (bug#39782). (gnus-icalendar-event:org-timestamp): New function. (gnus-icalendar--find-day): Use them. (gnus-icalendar-event--org-timestamp): Ditto.
* | Bind mwheel-scroll on more parts of frame's displayStefan Kangas2020-08-221-0/+38
| | | | | | | | | | | | | | | | * lisp/mwheel.el (mouse-wheel-mode): Bind unmodified 'mwheel-scroll' on scroll bars, fringes, margins, header and mode line. (Bug#5557) (mouse-wheel--create-scroll-keys): New helper function for 'mouse-wheel-mode'. * test/lisp/mwheel-tests.el: New file.
* | Fix several todo-mode.el editing bugs (bug#42976)Stephen Berman2020-08-212-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/calendar/todo-mode.el (todo-insert-item--basic): Ensure the target todo file is in todo-mode. (todo-edit-item--text): When editing a done item comment, prevent clobbering match data on finishing the edit. (todo-edit-item--header): Ensure that decrementing the month of the date header works for intervals greater than a year, and when incrementing or decrementing the month crosses one or more years, adjust the year as needed. (todo-read-category): If we're outside of todo-mode and there is a current todo file, use it; otherwise, use the default todo file. * test/lisp/calendar/todo-mode-tests.el (todo-test-edit-item-date-month): New test. * test/lisp/calendar/todo-mode-resources/todo-test-1.todo: Modify to accommodate new test.
* | Fix return value for CCL opcode lookup-integerPip Cet2020-08-211-0/+14
| | | | | | | | | | | | | | * src/ccl.c (ccl_driver): Fix LookupIntConstTbl return value. * test/lisp/international/ccl-tests.el (ccl-hash-table): Add test. * lisp/international/ccl.el (ccl-embed-data): Don't pass non-numbers to `ccl-fixnum' (bug#36740).