summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Add tests for remote files in auto-revert-testsMichael Albinus2019-05-032-15/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/autorevert.el (auto-revert-debug): New defvar. (auto-revert-notify-handler): Write traces. * lisp/filenotify.el (file-notify-debug): New defvar. (file-notify-handle-event, file-notify-callback): Write traces. * lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered): Handle nil `vc-handled-backends'. * test/lisp/autorevert-tests.el (auto-revert-test-remote-temporary-file-directory): New defconst. Handle also $REMOTE_FILE_NOTIFY_LIBRARY. (auto-revert--test-enabled-remote-checked): New defvar. (auto-revert--test-enabled-remote): New defun. (auto-revert--wait-for-revert): Rewrite without timeout. (auto-revert--deftest-remote): New defmacro. (auto-revert-test01-auto-revert-several-files): (auto-revert-test02-auto-revert-deleted-file): Adapt for remote files. (auto-revert-test02-auto-revert-deleted-file): Use `auto-revert-debug' for debug messages. (auto-revert-test00-auto-revert-mode-remote) (auto-revert-test01-auto-revert-several-files-mode-remote) (auto-revert-test02-auto-revert-deleted-file-mode-remote) (auto-revert-test03-auto-revert-tail-mode-mode-remote) (auto-revert-test04-auto-revert-mode-dired-mode-remote): New tests. * test/lisp/filenotify-tests.el (file-notify--test-event-handler): Use `file-notify-debug' for debug messages.
* * lisp/mail/footnote.el: Tweak markers conventionStefan Monnier2019-05-021-0/+47
| | | | | | | | | | | | | | | | | | | | Instead of using markers that are sometimes before and sometimes after the [...] and using `insert-before-markers` to make sure those that are are before stay before, always place them before, and make them "move after"so they stay with their [...] without the need for insert-before-markers. (footnote--current-regexp): Add arg to match previous style. Include the start/end "tags" in the regexp. Adjust all callers. (footnote--markers-alist): Change position of POINTERS. (footnote--refresh-footnotes, footnote--renumber) (footnote--make-hole, footnote-delete-footnote) (footnote-back-to-message): Adjust accordingly, mostly by using `looking-at` instead of `looking-back`. (footnote--make-hole): Always return footnote nb to use. (footnote-add-footnote): Simplify call accordingly. * test/lisp/mail/footnote-tests.el: New file.
* Fix decode-time/encode-time roundtrip on macOSPaul Eggert2019-04-301-0/+6
| | | | | | | | | * src/timefns.c (Fencode_time): Ignore DST flag when the zone is numeric or is a cons, as the doc string says it’s ignored in that case, and not ignoring it causes encode-time to not invert decode-time on some platforms (Bug#35502). * test/src/timefns-tests.el (encode-time-dst-numeric-zone): New test.
* Merge from origin/emacs-26Glenn Morris2019-04-291-0/+28
|\ | | | | | | | | | | | | 0e8d452 ; * doc/lispref/nonascii.texi (Coding System Basics): Fix gra... 25a2ff7 ; Add missing space in custom.texi 9ec18fb * admin/admin.el (set-version): Check for increase in version... 93912ba Be more careful about indent-sexp going over eol (Bug#35286)
| * Be more careful about indent-sexp going over eol (Bug#35286)Noam Postavsky2019-04-221-0/+28
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Only go over multiple sexps if the end of line is within a sexp. * test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-stop-before-eol-comment) (indent-sexp-stop-before-eol-non-lisp): New tests.
* | * test/lisp/net/tramp-tests.el (tramp--test-timeout-handler): Instrument.Michael Albinus2019-04-291-0/+4
| |
* | Replace use of obsolete string-make-unibyteNoam Postavsky2019-04-281-0/+44
| | | | | | | | | | | | * lisp/image-file.el (insert-image-file): Use encode-coding-region instead of string-make-unibyte. * test/lisp/image-file-tests.el: New test.
* | ; Add test for previous changeNoam Postavsky2019-04-281-0/+13
| | | | | | | | | | * test/lisp/progmodes/python-tests.el (python-indent-hanging-close-paren): New test.
* | Export major version of latest Emacs supported by emacs-module.h.Philipp Stephani2019-04-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful if module authors want to support multiple versions of emacs-module.h. * configure.ac (emacs_major_version): Define substitution. * src/emacs-module.h.in (EMACS_MAJOR_VERSION): Define macro. * doc/lispref/internals.texi (Module Initialization): Document EMACS_MAJOR_VERSION preprocessor macro. * test/data/emacs-module/mod-test.c (emacs_module_init): Verify behavior of EMACS_MAJOR_VERSION.
* | Fix another compilation warning.Philipp Stephani2019-04-281-1/+1
| | | | | | | | | | * test/src/emacs-module-tests.el (multiply-string): Remove unused variable ‘i’.
* | Fix a few minor compilation and Checkdoc warnings.Philipp Stephani2019-04-281-1/+10
| | | | | | | | | | | | * test/src/emacs-module-tests.el: Add package name and standard sections. (multiply-string): Add a docstring.
* | * test/src/emacs-module-tests.el: Switch to lexical binding.Philipp Stephani2019-04-281-1/+1
| |
* | * test/lisp/progmodes/sql-tests.el (sql-tests-buffer-naming-harness):Glenn Morris2019-04-251-1/+1
| | | | | | | | Fix previous for TEST_LOAD_EL=no.
* | * test/lisp/progmodes/sql-tests.el (sql-tests-buffer-naming-harness):Glenn Morris2019-04-251-14/+16
| | | | | | | | Skip if no sqlite program.
* | Make wdired-mode ignore ls file indicatorsStephen Berman2019-04-251-0/+45
| | | | | | | | | | | | | | | | * lisp/wdired.el (wdired--restore-dired-filename-prop): When dired-listing-switches includes "F" or "classify", don't treat appended indicator characters as part of the file name (bug#34915). * test/lisp/wdired-tests.el (wdired-test-bug34915): New test.
* | * lisp/progmodes/sql.elMichael R. Mauger2019-04-241-31/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (sql-is-sqli-buffer-p): New function. (sql-generate-unique-sqli-buffer-name): Refactor and use it. (sql-product-interactive): Simplify name logic. * test/lisp/progmodes/sql-tests.el (sql-tests-placeholder-filter-harness): New macro. (sql-tests-placeholder-filter-simple) (sql-tests-placeholder-filter-ampersand) (sql-tests-placeholder-filter-period): Refactored tests and use macro. (sql-tests-buffer-naming-harness): New macro. (sql-tests-buffer-naming-default) (sql-tests-buffer-naming-multiple) (sql-tests-buffer-naming-explicit) (sql-tests-buffer-naming-universal-argument) (sql-tests-buffer-naming-existing): New tests.
* | Unbreak build when building without GMP support.Philipp Stephani2019-04-242-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for a new preprocessor macro EMACS_MODULE_HAVE_MPZ_T to emacs-module.h. If this macro is defined, assume that mpz_t is already defined and don’t include gmp.h. Don’t document the new macro for now, as it’s unclear whether we want to support this in modules outside the Emacs tree. * src/emacs-module.h.in: Allow user to prevent inclusion of gmp.h. * src/emacs-module.c: Use mini-gmp if GMP is unavailable. Don’t include gmp.h. * src/lisp.h: Don’t require gmp.h. It’s not needed for lisp.h. * test/Makefile.in (GMP_LIB, GMP_OBJ): New variables. ($(test_module)): Use them. * test/data/emacs-module/mod-test.c: Use mini-gmp if GMP is unavailable.
* | Add missing GMP library to test module.Philipp Stephani2019-04-241-1/+2
| | | | | | | | | | * test/Makefile.in (GMP_LIB): Define variable. ($(test_module)): Use it.
* | Clarify rounding mode when converting to struct timespec.Philipp Stephani2019-04-242-0/+36
| | | | | | | | | | | | | | | | | | | | | | * doc/lispref/internals.texi (Module Values): Clarify that the truncation is towards negative infinity. * test/data/emacs-module/mod-test.c (Fmod_test_nanoseconds): Add test function. (emacs_module_init): Define it. * test/src/emacs-module-tests.el (mod-test-nanoseconds): New unit test.
* | Fix return type of make_time.Philipp Stephani2019-04-241-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | make_time is documented to return a (TICKS . HZ) pair, so we can’t use make_lisp_time. Introduce a new conversion function instead. * src/emacs-module.c (module_make_time): Use timespec_to_lisp to correct return type. * src/timefns.c (timespec_to_lisp): New function. (make_lisp_time): Use it. * test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid): Check return type.
* | Add module functions to convert from and to big integers.Philipp Stephani2019-04-242-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/module-env-27.h: Add new module functions to convert big integers. * src/emacs-module.h.in (emacs_mpz): Define if GMP is available. * src/emacs-module.c (module_extract_big_integer) (module_make_big_integer): New functions. (initialize_environment): Use them. * test/data/emacs-module/mod-test.c (Fmod_test_double): New test function. (emacs_module_init): Define it. * test/src/emacs-module-tests.el (mod-test-double): New unit test. * doc/lispref/internals.texi (Module Values): Document new functions.
* | Add conversions to and from struct timespec to module interface.Philipp Stephani2019-04-242-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Time values are a fundamental data type, and such conversions are hard to implement within modules because of the various forms of time values in Emacs Lisp. Adding dedicated conversion functions can significantly simplify module code dealing with times. This approach uses nanosecond precision. While Emacs in theory has support for higher-precision time values, in practice most languages and standards, such as POSIX, C, Java, and Go, have settled on nanosecond-precision integers to represent time. * src/emacs-module.h.in: Add header for struct timespec. * src/module-env-27.h: Add module functions for time conversion. * src/emacs-module.c (module_extract_time, module_make_time): New functions. (initialize_environment): Use them. * test/data/emacs-module/mod-test.c (Fmod_test_add_nanosecond): New test function. (emacs_module_init): Define it. * test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid) (mod-test-add-nanosecond/nil, mod-test-add-nanosecond/invalid): New unit tests. * doc/lispref/internals.texi (Module Values): Document time conversion functions.
* | Small fix for a JSON unit test.Philipp Stephani2019-04-231-1/+1
| | | | | | | | | | | | | | * test/src/json-tests.el (json-parse-string/null): Make JSON object syntactically valid. This test is supposed to check whether an escaped null character causes an error, but without quoting the string it would be syntactically invalid in any case.
* | Some changes in tramp-testsMichael Albinus2019-04-221-2/+4
| | | | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test32-shell-command): Check for backward compatibility. (tramp-test33-environment-variables): Apply a better check for unset variable.
* | Merge from origin/emacs-26Glenn Morris2019-04-211-0/+45
|\ \ | |/ | | | | | | | | | | | | 037970f Document insert-image-file's return value (Bug#32978) 598b45a Autoload cua-toggle-rectangle-mark (Bug#34947) 95bd56d Tell xclip not to expect job-control under eshell (Bug#35257) 9997bbb ; * src/emacs.c: Fix typo in comment (Bug#35320). a4ad7be Fix off-by-one-link error in image--set-property
| * Fix off-by-one-link error in image--set-propertyBasil L. Contovounesios2019-04-181-0/+45
| | | | | | | | | | | | | | | | * lisp/image.el (image--set-property): Ensure new value is set even in the unlikely case that the plist is empty. Fix off-by-one-link error when deleting a property. (bug#35285) * test/lisp/image-tests.el: New file. (image--set-property): New test.
| * Backport: js--re-search-backward-inner: Fix infloopDmitry Gutov2019-02-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | Fix JS indentation infloop reported in https://github.com/mooz/js2-mode/issues/513. * lisp/progmodes/js.el (js--re-search-backward-inner): Account for multiline string literals. * test/manual/indent/js.js: New test example. (cherry picked from commit b01a4295c2f9bb58858880e4e28b05cc8396791c)
* | * lisp/progmodes.sql.elMichael R. Mauger2019-04-211-0/+34
| | | | | | | | | | | | | | | | | | | | (sql-product-alist): Corrected :terminator defns. (sql-debug-send): New variable. (sql-send-string): Use it and correct buffer context. (sql-send-magic-terminator): Use `sql-input-sender'. (sql-placeholders-filter): Bug#11481 Don't recursively replace placeholders * test/lisp/progmodes/sql-tests.el (sql-test-placeholder-filter): Test placeholder functionality.
* | Mark different-diagnostic-types as failed on emba.Michael Albinus2019-04-201-1/+2
| | | | | | | | | | * test/lisp/progmodes/flymake-tests.el (different-diagnostic-types): Expect also failure on emba.gnu.org.
* | Make warning about unescaped character literals more helpful.Philipp Stephani2019-04-192-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See Bug#31676. * lisp/emacs-lisp/byte-run.el (byte-run--unescaped-character-literals-warning): New defun. * src/lread.c (load_warn_unescaped_character_literals): Use new defun. (syms_of_lread): Define symbol for new defun. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Use new defun. * test/src/lread-tests.el (lread-tests--unescaped-char-literals): test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--unescaped-char-literals): Adapt unit tests.
* | ; Remove instrumentation in tramp-testsMichael Albinus2019-04-191-9/+5
| |
* | Remove :stop key from make-process.Philipp Stephani2019-04-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | This has never worked and caused issues such as Bug#30460. * src/process.c (Fmake_process): Don't accept :stop key any more. (syms_of_process): Define needed symbol 'null'. * test/src/process-tests.el (make-process/stop): New unit test. * doc/lispref/processes.texi (Asynchronous Processes): Remove :stop key from manual.
* | Adapt tramp-test32-shell-commandMichael Albinus2019-04-191-7/+2
| | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test32-shell-command): Check "tput" before running `shell-command-width' test.
* | Add a new user option 'ido-big-directories'.Philipp Stephani2019-04-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | This provides an alternative to 'ido-max-directory-size', for directories that are statically known to be too big for Ido completion. * lisp/ido.el (ido-big-directories): New user option. (ido-directory-too-big-p): Use it. * test/lisp/ido-tests.el (ido-directory-too-big-p): New unit test.
* | ; Instrument `tramp--test-shell-command-to-string-asynchronously'Michael Albinus2019-04-181-6/+9
| |
* | Add ERT explainer for 'tramp--test-file-attributes-equal-p'Philipp Stephani2019-04-171-0/+3
| | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp--test-file-attributes-equal-p): Use ERT explainer for 'equal' to improve failure messages.
* | Fix tramp-test32-shell-commandMichael Albinus2019-04-171-4/+5
| | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test32-shell-command): Run only if "tput" exist.
* | ; Fix files-tests-executable-find on w32 (Bug#35241)Noam Postavsky2019-04-171-1/+1
| | | | | | | | | | | | * test/lisp/files-tests.el (files-tests-executable-find): Make the tmpfile end with one of exec-suffixes, so that it will be executable on w32.
* | ; Instrument tramp-test32-shell-command for EMBAMichael Albinus2019-04-171-0/+3
| |
* | Fix Bug#35241Michael Albinus2019-04-171-0/+26
| | | | | | | | | | | | * lisp/files.el (executable-find): Quote default-directory. (Bug#35241) * test/lisp/files-tests.el (files-tests-executable-find): New test.
* | * test/lisp/files-tests.el: Unify test namesMichael Albinus2019-04-171-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/files-tests.el (files-tests-local-variables) (files-tests-bug-18141, files-tests-make-temp-file-empty-prefix) (files-tests-bug-21454) (files-tests-save-buffers-kill-emacs--confirm-kill-processes) (files-tests-read-file-in-~) (files-tests-file-name-non-special--subprocess) (files-tests-file-name-non-special--buffers) (files-tests-insert-directory-wildcard-in-dir-p) (files-tests-make-directory, files-tests-no-file-write-contents) (files-tests-copy-directory, files-tests-abbreviated-home-dir): Unify test names.
* | Test `shell-command-width' in TrampMichael Albinus2019-04-171-10/+32
| | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp--test-shell-command-to-string-asynchronously): Move up. (tramp-test32-shell-command): Test `shell-command-width'.
* | Minor change in a commentEli Zaretskii2019-04-151-5/+6
| | | | | | | | | | | | * test/src/callproc-tests.el (call-process-w32-debug-spawn-error): Minor copyedits of the commentary.
* | Let debugger handle process spawn errors on w32 (Bug#33016)Noam Postavsky2019-04-142-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since child_setup() is called between block_input()...unblock_input(), when an error is signaled the Lisp debugger is prevented from starting. Therefore, let the callers signal the error instead (which they already do for non-w32 platforms, just the error message needs an update). * src/callproc.c (child_setup) [WINDOWSNT]: Don't call report_file_error here. (call_process) [WINDOWNT]: * src/process.c (create_process) [WINDOWSNT]: Call report_file_errno here instead, after the unblock_input() call, same as for !WINDOWSNT. * src/lisp.h (CHILD_SETUP_ERROR_DESC): New preprocessor define. Flip the containing ifndef DOS_NT branches so that it's ifdef DOS_NT. * src/eval.c (when_entered_debugger): Remove. (syms_of_eval) <internal-when-entered-debugger>: Define it as a Lisp integer variable instead. (maybe_call_debugger): Update comment. * test/src/process-tests.el (make-process-w32-debug-spawn-error): * test/src/callproc-tests.el (call-process-w32-debug-spawn-error): New tests.
* | Some rearragements for remote tests in filenotify-tests.elMichael Albinus2019-04-141-8/+8
| | | | | | | | | | | | | | | | * test/lisp/filenotify-tests.el (file-notify--deftest-remote): Change argument list, EXPECTED is not needed. (file-notify-test07-many-events-remote) (file-notify-test09-watched-file-in-watched-dir-remote): Adapt declaration accordingly.
* | Fix last patchMichael Albinus2019-04-131-1/+1
| |
* | Replace (skip-unless nil) by tag :unstable in test packagesMichael Albinus2019-04-133-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/filenotify-tests.el (file-notify--deftest-remote): Use tag :unstable if SKIP is non-nil. * test/lisp/net/tramp-tests.el (tramp-test36-vc-registered): Use ert-skip instead of (skip-unless nil). * test/lisp/progmodes/python-tests.el (python-tests--python-nav-end-of-statement--infloop): Use tag :unstable instead of (skip-unless nil).
* | Add :array-type option to json-parse-stringDmitry Gutov2019-04-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/json.c (enum json_array_type): New type. (struct json_configuration): New field array_type. (json_parse_args): Rename the last argument. Handle the :array-type keyword argument (bug#32793). (Fjson_parse_string): Update the docstring accordingly. (json_to_lisp): Handle the case of :array-type being `list'. Add a call to 'rarely_quit' inside the loop. (syms_of_json): Define new symbols. (Fjson_serialize, Fjson_insert, Fjson_parse_string) (Fjson_parse_buffer): Update the config struct initializers.
* | Move proper-list-p tests to fns-tests.elBasil L. Contovounesios2019-04-122-18/+18
| | | | | | | | | | | | | | | | This follows the move of proper-list-p from lisp/subr.el to src/fns.c in 2018-07-24T15:58:46-07:00!eggert@cs.ucla.edu. * test/lisp/subr-tests.el (subr-tests--proper-list-p): Move from here... * test/src/fns-tests.el (test-proper-list-p): ...to here.
* | * test/lisp/progmodes/python-tests.el: "Fix" failing testStefan Monnier2019-04-102-0/+13
| | | | | | | | (python-tests--python-nav-end-of-statement--infloop): Disable.