summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix searching for multibyte needles in unibyte haystacksLars Ingebrigtsen2020-09-271-1/+5
| | | | | | | | | | * src/fns.c (Fstring_search): Make this work better when searching unibyte haystacks for multibyte needles (bug#43598).
* | Add tiny optimization for string-searchLars Ingebrigtsen2020-09-271-0/+3
| | | | | | | | | | * src/fns.c (Fstring_search): Add tiny optimization for needles that are longer than the haystack (bug#43598).
* | Rename replace-in-string to string-replaceLars Ingebrigtsen2020-09-271-13/+13
| | | | | | | | | | | | | | | | | | * doc/lispref/searching.texi (Search and Replace): Update. * lisp/bindings.el (mode-line-position): Update callers. * lisp/subr.el (string-replace): Rename from replace-in-string since that clashes with XEmacs' replace-in-string which is equivalent to the Emacs replace-regexp-in-string (bug#43598).
* | Silence some byte-compiler warningsStefan Kangas2020-09-264-4/+11
| | | | | | | | | | | | | | | | | | * test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode): * test/lisp/custom-tests.el (cus-test-opts): * test/lisp/help-fns-tests.el (foo-test-map) (help-fns-test--describe-keymap-foo): * test/src/fns-tests.el (w32-collate-ignore-punctuation) (fns-tests-func-arity): Silence byte-compiler warnings.
* | Repurpose libxml test for obsolete argumentStefan Kangas2020-09-262-20/+22
| | | | | | | | | | | | | | | | | | | | | | * test/src/xml-tests.el (libxml-tests): Move half this test for the recently obsoleted fourth argument to libxml-parse-xml-region... * test/lisp/xml-tests.el (xml-tests--remove-comments): ...to a new test here for xml-remove-comments. * test/src/xml-tests.el (libxml-tests--data-comments-discarded): Move test data from here... * test/lisp/xml-tests.el (xml-tests--data-with-comments): ...to here.
* | Fix out-of-tree make checkGlenn Morris2020-09-251-1/+5
| | | | | | | | | | * test/lisp/custom-tests.el (custom-test-admin-cus-test): New const. (check-for-wrong-custom-types): Use it.
* | string-search robustness and documentation improvement (bug#43598)Mattias Engdegård2020-09-251-1/+29
| | | | | | | | | | | | | | | | * src/fns.c (Fstring_search): Check START-POS argument range. Simplify logic. Improve doc string. * test/src/fns-tests.el (string-search): Add test cases. * doc/lispref/strings.texi (Text Comparison): Elaborate. * lisp/emacs-lisp/byte-opt.el (pure-fns): Mark string-search as pure.
* | Add an expensive test for defcustom typesLars Ingebrigtsen2020-09-251-0/+5
| | | | | | | | | | | | | | * admin/cus-test.el (cus-test-opts): Return the tests. * test/lisp/custom-tests.el (check-for-wrong-custom-types): Test custom types (bug#30990).
* | Fix replace-in-string infloop with empty pattern string (bug#43598)Mattias Engdegård2020-09-251-1/+3
| | | | | | | | | | | | * lisp/subr.el (replace-in-string): Raise an error if FROMSTRING is empty. * test/lisp/subr-tests.el (replace-in-string): Add test case.
* | Fix previous replace-in-string rewriteLars Ingebrigtsen2020-09-251-2/+2
| | | | | | | | | | * lisp/subr.el (replace-in-string): Fix logic errors in previous patch.
* | Fix replace-in-string multibyteness problems with string-searchLars Ingebrigtsen2020-09-251-1/+9
| | | | | | | | | | * lisp/subr.el (replace-in-string): Simplify by using the new string-search function (bug#43598).
* | Add a new function 'string-search'Lars Ingebrigtsen2020-09-251-0/+23
| | | | | | | | | | * doc/lispref/strings.texi (Text Comparison): Document it. * src/fns.c (Fstring_search): New function.
* | Update a failing lisp testGlenn Morris2020-09-241-1/+1
| | | | | | | | | | * test/lisp/emacs-lisp/lisp-tests.el (up-list-no-cross-string): Update for recent "Don't signal scan-error" change.
* | Add skip condition for some dbus testsGlenn Morris2020-09-241-11/+15
| | | | | | | | | | | | * test/lisp/net/dbus-tests.el (dbus-test01-type-conversion) (dbus-test01-basic-types): Add skip for hydra.nixos.org failures. ; Standardize license notice
* | Remove TODO to convert files to unit testsStefan Kangas2020-09-232-4/+0
| | | | | | | | | | | | | | * test/lisp/textmodes/css-mode-tests.el: * test/lisp/progmodes/ruby-mode-tests.el: Remove TODO to convert test files into unit tests. The files are still useful for debugging. Ref: https://lists.gnu.org/r/emacs-devel/2020-09/msg01906.html
* | Convert some completion.el tests to ERTStefan Kangas2020-09-231-0/+170
| | | | | | | | | | * test/lisp/completion-tests.el: New file. * lisp/completion.el: Move commented out tests to completion-tests.el.
* | Convert allout unit tests to ERTStefan Kangas2020-09-232-0/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/allout-tests.el: New file. * lisp/allout.el (allout-run-unit-tests-on-load) (allout-run-unit-tests): Remove. (allout-tests-obliterate-variable) (allout-tests-globally-unbound, allout-tests-globally-true) (allout-tests-locally-true, allout-test-resumptions): Move to allout-tests.el * test/lisp/allout-widgets-tests.el: New file. * lisp/allout-widgets.el (allout-widgets-run-unit-tests-on-load) (allout-widgets-run-unit-tests): Remove. (allout-test-range-overlaps): Move to allout-widgets-tests.el.
* | * test/lisp/net/dbus-tests.el (dbus-test01-basic-types): Adapt test.Michael Albinus2020-09-231-5/+6
| |
* | Allow the newline character in the character widget (Bug#15925)Mauro Aranda2020-09-231-0/+16
| | | | | | | | | | | | | | | | | | | | * lisp/wid-edit.el (widget-specify-field): Extend check for adding the boundary overlay. Plus, a minor comment indentation fix. (character widget): Tweak the valid-regexp to allow the newline character. * test/lisp/wid-edit-tests.el (widget-test-character-widget-value) (widget-test-editable-field-widget-value): New tests (bug#15925).
* | test/src/xdisp-tests.el: New fileStefan Monnier2020-09-221-0/+52
| |
* | Make delete-pair only delete pairs that are part of insert-pair-alistmartin rudalics2020-09-221-2/+1
| | | | | | | | | | * lisp/emacs-lisp/lisp.el (delete-pair): Only delete pairs that are part of `insert-pair-alist' (bug#4136).
* | ; * test/lisp/progmodes/ps-mode-tests.el: Add missing backslashMattias Engdegård2020-09-221-1/+1
| |
* | Support shellcheck in compilation-modeStefan Kangas2020-09-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Add shellcheck regexp. * test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data): (compile-test-error-regexps): Add test for shellcheck. * etc/compilation.txt: Add shellcheck example. * etc/NEWS: Announce the change. foo
* | Remove some unnecessary compat codeStefan Kangas2020-09-222-13/+9
| | | | | | | | | | | | | | * test/lisp/emacs-lisp/ert-x-tests.el (ert-test-describe-test): * test/lisp/wdired-tests.el (wdired-test-unfinished-edit-01): Remove unnecessary compat code; these tests should never need to run on older versions of Emacs.
* | Convert a manual test for nxml-mode to unit testStefan Kangas2020-09-212-10/+21
| | | | | | | | | | | | * test/manual/indent/nxml.xml: Delete file. * test/lisp/nxml/nxml-mode-tests.el (nxml-mode-test-comment-bug-17264): New test based on deleted file.
* | Convert manual indent test for ruby-mode into unit testStefan Kangas2020-09-212-0/+19
| | | | | | | | | | | | | | | | | | * test/manual/indent/ruby.rb: Move from here... * test/lisp/progmodes/ruby-mode-resources/ruby.rb: ...to here. * test/lisp/progmodes/ruby-mode-tests.el (ruby-mode-tests-data-dir): New variable. (ruby--indent/converted-from-manual-test): New test.
* | Convert manual indent test for scheme-mode into unit testStefan Kangas2020-09-212-9/+50
| | | | | | | | | | | | * test/manual/indent/scheme.scm: Delete file. * test/lisp/progmodes/scheme-tests.el: New file with unit test for scheme-mode based on deleted file.
* | Convert manual indent test for ps-mode into unit testStefan Kangas2020-09-212-14/+24
| | | | | | | | | | | | * test/manual/indent/ps-mode.ps: Delete file. * test/lisp/progmodes/ps-mode-tests.el (ps-mode-test-indent): New unit test based on deleted file.
* | Convert manual indent test for opascal-mode into unit testStefan Kangas2020-09-212-12/+45
| | | | | | | | | | | | * test/manual/indent/opascal.pas: Delete file. * test/lisp/progmodes/opascal-tests.el: New file with unit test for oposcal-mode based on deleted file.
* | Convert manual indent test for lisp-mode into unit testStefan Kangas2020-09-212-5/+12
| | | | | | | | | | | | * test/manual/indent/lisp.lisp: Delete file. * test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-indent-defun): New unit test based on deleted file.
* | Convert manual indent test for elisp-mode into unit testStefan Kangas2020-09-212-6/+12
| | | | | | | | | | | | * test/manual/indent/elisp.el: Delete file. * test/lisp/progmodes/elisp-mode-tests.el (elisp-indent-basic): New unit test based on deleted file.
* | ; * test/lisp/textmodes/css-mode-tests.el: Add TODO.Stefan Kangas2020-09-211-0/+2
| |
* | ; Fix more trivial typosStefan Kangas2020-09-216-6/+6
| |
* | ; Fix typosStefan Kangas2020-09-217-7/+7
| |
* | Add D-Bus testsMichael Albinus2020-09-211-0/+269
| | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/dbus.texi (Type Conversion): Precise basic type values. * lisp/net/dbus.el (dbus-register-property): Send signal directly. * src/dbusbind.c (xd_signature): Accept non-nil objects for DBUS_TYPE_BOOLEAN. * test/lisp/net/dbus-tests.el (dbus-test01-basic-types) (dbus-test01-compound-types): New tests.
* | Merge from origin/emacs-27Glenn Morris2020-09-201-3/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | df04f3e755 Fix a rare segfault in syntax.c fd1fe1e1ec Add doc to syntax-propertize-function saying it must do a ... fcd599bbea Minor copyedits of doc of 'with-silent-modifications' 759399cdb1 Improve documentation of 'max-mini-window-height' 3223302aa2 Use modern constant names for the NS pasteboard 985703d380 Fix doc string of 'toggle-menu-bar-mode-from-frame' 184a4977c7 Make vc-bzr tests work with brz 3.1 (bug#43314) # Conflicts: # lisp/emacs-lisp/syntax.el # src/syntax.c
| * Make vc-bzr tests work with brz 3.1 (bug#43314)Glenn Morris2020-09-121-3/+16
| | | | | | | | | | | | * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-bug9726) (vc-bzr-test-bug9781, vc-bzr-test-faulty-bzr-autoloads): Make them work with brz 3.1.
| * Backport recent change in tramp-tests.el from master, don't mergeMichael Albinus2020-09-041-12/+9
| | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name): No need to expect different results in Emacs 28 and later.
* | Make D-Bus properties type safeMichael Albinus2020-09-201-72/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/dbus.texi (Properties and Annotations): Precise dbus-get-property and dbus-set-property. (Type Conversion): Explain :byte and :boolean type conversion. (Errors and Events): dbus-ignore-errors returns nil when there is a D-Bus error. Remove dbus-show-dbus-errors. * etc/NEWS: Some D-Bus relevant changes. * lisp/net/dbus.el (dbus-show-dbus-errors): Remove. (dbus-ignore-errors): Replay implamentation without that variable. (dbus-check-arguments): New defun. (dbus-list-activatable-names, dbus-list-names) (dbus-list-queued-owners, dbus-get-name-owner, dbus-introspect) (dbus-get-all-properties, dbus-get-all-managed-objects): Don't debug. (dbus-get-property, dbus-set-property): Propagate errors. (dbus-register-property): Check for valid VALUE. (dbus-property-handler): Simplify. * src/dbusbind.c (Fdbus_message_internal): Adapt docstring. Handle DBUS_MESSAGE_TYPE_INVALID. * test/lisp/net/dbus-tests.el (dbus-show-dbus-errors): Don't declare. (dbus-test06-register-property) (dbus-test06-register-property-emits-signal): Adapt tests.
* | Tweak dired warning about "wildcard" charactersKévin Le Gouguec2020-09-201-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/dired-aux.el (dired-isolated-string-re): Use explicitly numbered groups. (dired--star-or-qmark-p): Add START parameter. Make sure to return the first isolated match. (dired--need-confirm-positions, dired--mark-positions) (dired--highlight-no-subst-chars, dired--no-subst-explain) (dired--no-subst-ask, dired--no-subst-confirm): New functions. (dired-do-shell-command): Use them (bug#28969, bug#35564). * test/lisp/dired-aux-tests.el (dired-test-bug27496): Adapt to new prompt. (dired-test--check-highlighting): New test helper. (dired-test-highlight-metachar): New tests.
* | Terminate `comint-password-function' testsdickmao2020-09-201-55/+23
| | | | | | | | | | | | | | | | | | * test/lisp/comint-tests.el (comint-test-no-password-function) (comint-test-password-function-with-value) (comint-test-password-function-with-nil): refactor (comint-tests/test-password-function): actually test `comint-send-invisible' and inhibit inadvertent interactive query (bug#38825).
* | Tweak a hash table print testLars Ingebrigtsen2020-09-201-1/+1
| |
* | Fix printing of hash tables with removed elementsPip Cet2020-09-201-0/+28
| | | | | | | | | | | | * src/print.c (print_vectorlike): Keep track of the actual number of elements printed rather than attempting to use hash bucket indices (bug#38892).
* | New command: revert-buffer-with-fine-grainMauro Aranda2020-09-201-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/files.texi (Reverting): Document the new command and the new variable. * etc/NEWS: Mention the new command and the new variable. * lisp/files.el (revert-buffer-with-fine-grain): New command. Revert a buffer trying to be non-destructive, by using replace-buffer-contents. (revert-buffer-insert-file-contents-delicately): New function, alternative to revert-buffer-insert-file-contents-function--default-function. (revert-buffer-with-fine-grain-max-seconds): New variable. Passed as argument MAX-SECS of replace-buffer-contents. * test/lisp/files-tests.el (files-tests-lao files-tests-tzu): Helper variables, taken from diffutils manual, to test reverting a buffer. (files-tests-revert-buffer) (files-tests-revert-buffer-with-fine-grain): New tests (bug#18).
* | Put files in mhtml-mode when they have <!DOCTYPE, case-insensitiveDaniel Martín2020-09-191-0/+12
| | | | | | | | | | | | | | | | | | * lisp/files.el (magic-fallback-mode-alist): Match "DOCTYPE" in a case-insensitive way before putting files in mhtml-mode. See https://html.spec.whatwg.org/multipage/syntax.html#the-doctype for the standard reference. * test/lisp/files-tests.el (files-test-magic-mode-alist-doctype): Add a test (bug#43511).
* | Fix error in D-Bus testMichael Albinus2020-09-181-21/+23
| | | | | | | | | | | | | | | | | | * test/lisp/net/dbus-tests.el (dbus-test04-register-method): Do not check for error message text. (dbus--test-signal-handler): Fix docstring. (dbus--test-timeout-handler): New defun. (dbus-test05-register-signal) (dbus-test06-register-property-emits-signal): Use it.
* | cperl-mode: Add new value "PBP" for 'cperl-set-style'Harald Jörg2020-09-172-0/+75
| | | | | | | | | | | | | | | | | | | | * lisp/progmodes/cperl-mode.el (cperl-style-alist) (cperl-set-style): Add indentation style recommended by Damian Conway's book "Perl Best Practices". * test/lisp/progmodes/cperl-mode-tests.el (cperl-mode-test-indent-styles): Add a test to verify indentation and unraveling of conditionals (bug#43457).
* | Work on D-Bus properties etcMichael Albinus2020-09-171-3/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/dbus.el (seq, subr-x): Require. (dbus-error-disconnected, dbus-error-service-unknown): New defconst. (dbus-set-property, dbus-register-property): Use `keywordp'. Fix proper value sending a signal. * test/lisp/net/dbus-tests.el (dbus-test04-register-method): Extend test. (dbus--test-signal-received): New defvar. (dbus--test-signal-handler): New defun. (dbus-test05-register-signal) (dbus-test06-register-property-emits-signal): New tests. (dbus-test06-register-property) (dbus-test06-register-property-several-paths): Rename tests.
* | Give Lisp control on the lossage sizeTino Calancha2020-09-171-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a command 'lossage-size' to set the maximum number or recorded keystrokes (Bug#38796). * src/keyboard.c (lossage_limit): Static variable with the current lossage size limit. (MIN_NUM_RECENT_KEYS): Renamed from NUM_RECENT_KEYS. Set it as 100 and use it as the minimum value for lossage_limit. Keep the same default for the vector size as before (300). (lossage-size): New command. (update_recent_keys): Helper function. (command_loop_1) (record_char) (recent-keys) (syms_of_keyboard): Use lossage_limit as the vector size. * lisp/help.el (view-lossage): Mention the new command in the docstring. * etc/NEWS (Changes in Emacs 28.1): Announce this change. * doc/emacs/help.texi (Misc Help): Update manual. * test/src/keyboard-tests.el (keyboard-lossage-size): Add test.
* | Fix up previous replace-in-string commitLars Ingebrigtsen2020-09-151-1/+7
| | | | | | | | * lisp/subr.el (replace-in-string): Fix thinko in implementation.