aboutsummaryrefslogtreecommitdiffstats
path: root/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Add command to replace buffer contentsPhilipp Stephani2017-06-171-0/+31
| | | | | | | | | | | | | | | | | Add a new command 'replace-buffer-contents' that uses the Myers diff algorithm to non-destructively replace the accessible portion of the current buffer. The Myers algorithm is implemented in Gnulib. * src/editfns.c (Freplace_buffer_contents): New command. (set_bit, bit_is_set, buffer_chars_equal): New helper functions. (syms_of_editfns): Define new command. * test/src/editfns-tests.el (replace-buffer-contents-1) (replace-buffer-contents-2): New unit tests. * src/buffer.h (BUF_FETCH_CHAR_AS_MULTIBYTE): New helper macro. * admin/merge-gnulib (GNULIB_MODULES): Add diffseq.h and minmax.h.
* Complete CSS property values less eagerly (Bug#27392)Simen Heggestøyl2017-06-171-1/+6
| | | | | | | | | | * lisp/textmodes/css-mode.el (css--complete-property-value): Be less eager by looking for a colon after the property which values are being completed for. * test/lisp/textmodes/css-mode-tests.el (css-test-complete-property): Add a test case ensuring that properties that are prefixes of other properties don't hinder further completion.
* Add test for the fix in the parent commitDmitry Gutov2017-06-171-0/+22
| | | | | * test/src/undo-tests.el (undo-test-skip-invalidated-markers): New test, for the fix in the parent commit.
* Correctly detect URLs surrounded by parentheses in commentsPhilipp Stephani2017-06-161-0/+9
| | | | | | | | * lisp/thingatpt.el (thing-at-point--bounds-of-well-formed-url): Make parentheses match work inside comments. * test/lisp/thingatpt-tests.el (thing-at-point-url-in-comment): Add unit test.
* Fix load-path issue when it contains remote directoriesMichael Albinus2017-06-161-1/+23
| | | | | | | | | | * lisp/net/tramp.el (tramp-file-name-handler): Use `autoloadp'. (tramp-use-absolute-autoload-file-names): New defun. Call it after loading tramp.el. * test/lisp/net/tramp-tests.el (tramp-test38-remote-load-path): New test. (tramp-test39-unload): Rename.
* Fix Bug#27315Michael Albinus2017-06-141-0/+1
| | | | | | | | | | | | | | | * lisp/net/tramp-cache.el (tramp-cache-read-persistent-data): New defvar. (top): Use it. * lisp/net/tramp.el (tramp-handle-file-name-case-insensitive-p): Check for connected, not for connectable. (Bug#27315) (tramp-process-actions): * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): Use `tramp-cache-read-persistent-data'. * test/lisp/net/tramp-tests.el (top): Set also `tramp-cache-read-persistent-data'.
* Use --module-assertions if modules are availablePhilipp Stephani2017-06-141-1/+7
| | | | | | | | Using --module-assertions helps us find bugs in the test module. But we can use it only if Emacs was compiled with module support. * test/Makefile.in (MODULES_EMACSOPT): New variable. (emacs): Use it.
* Fix running tests in without-modules buildsGlenn Morris2017-06-131-1/+1
| | | | | * test/Makefile.in (EMACSOPT): Remove option that is only defined with-modules. emacs-module-tests.el passes it where needed.
* * test/Makefile.in (src/emacs-module-tests.log): Out-of-tree fix.Glenn Morris2017-06-131-4/+3
|
* Inline test module Makefile into main test MakefilePhilipp Stephani2017-06-132-63/+30
| | | | | | | | | | | The test/data/emacs-module/Makefile only built a single target, and inlining it into test/Makefile simplifies dependency tracking and reduces code duplication. * configure.ac: Don't build test/data/emacs-module/Makefile. * Makefile.in ($(test_module)): Inline compilation. (clean): Also clean test module outputs.
* Fix wrong indentation after string literal (Bug#27306)Noam Postavsky2017-06-131-0/+13
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-indent-state) (lisp-indent-calc-next): Remove `depth' field, use (car ppss) instead. * test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-indent-region-after-string-literal): New test.
* Print module structure sizes when initializing test modulePhilipp Stephani2017-06-121-2/+12
| | | | | * test/data/emacs-module/mod-test.c (emacs_module_init): Print compile-time and runtime sizes of module structures to ease debugging
* Give a more informative failure in module assertion testGlenn Morris2017-06-121-5/+8
| | | | | * test/src/emacs-module-tests.el (module--test-assertions): Rephrase final check to give a more informative failure.
* Fix off-by-one errorPhilipp Stephani2017-06-121-1/+1
| | | | | * test/data/emacs-module/mod-test.c (emacs_module_init): Fix off-by-one error.
* Clean up after module assertion testsGlenn Morris2017-06-121-20/+24
| | | | | * test/src/emacs-module-tests.el (module--test-assertions): Use a temporary directory to contain any core dumps.
* Small improvement for module assertion testGlenn Morris2017-06-121-15/+15
| | | | | * test/src/emacs-module-tests.el (module--test-assertions): Don't rely on the precise form of an "Abort" message.
* Improve previous test/data/emacs-module/Makefile changeGlenn Morris2017-06-121-1/+2
| | | | | * test/data/emacs-module/Makefile.in (clean): Avoid doing unpleasant things if run in a build without modules.
* Small improvements for test/data/emacs-module/MakefileGlenn Morris2017-06-121-2/+8
| | | | | | | * test/data/emacs-module/Makefile.in (%.o): Fix emacs-module dependency. (SECONDARY): Stop make automatically deleting *.o. (clean): New rule.
* Test module: add necessary version checksPhilipp Stephani2017-06-121-0/+6
| | | | | * test/data/emacs-module/mod-test.c (emacs_module_init): Add necessary version checks.
* Use additional CFLAGS from configurePhilipp Stephani2017-06-121-1/+7
|
* Use Autoconf to generate the test module MakefilePhilipp Stephani2017-06-122-11/+16
| | | | | | | | | | | | | This makes it easier to pass compilation flags around. * configure.ac: Also build test module Makefile. * test/data/emacs-module/Makefile.in: New makefile template. * test/Makefile.in ($(test_module)): No longer necessary to pass @MODULES_SUFFIX@ around. * .gitignore: Test module Makefile can now be ignored.
* Also compile test module as C11Philipp Stephani2017-06-121-2/+2
| | | | * test/data/emacs-module/Makefile (CFLAGS): Compile test module as C11
* Implement module assertions for usersPhilipp Stephani2017-06-123-4/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new command-line option '-module-assertions' that users can enable developing or debugging a module. If this option is present, Emacs performs additional checks to verify that modules fulfill their requirements. These checks are expensive and crash Emacs if modules are invalid, so disable them by default. This is a command-line option instead of an ordinary variable because changing it while Emacs is running would cause data structure imbalances. * src/emacs.c (main): New command line option '-module-assertions'. * src/emacs-module.c (module_assert_main_thread) (module_assert_runtime, module_assert_env, module_assert_value): New functions to assert module requirements. (syms_of_module): New uninterned variable 'module-runtimes'. (init_module_assertions, in_main_thread, module_abort): New helper functions. (initialize_environment): Initialize value list. If assertions are enabled, use a heap-allocated environment object. (finalize_environment): Add assertion that environment list is never empty. (finalize_runtime_unwind): Pop module runtime object stack. (value_to_lisp): Assert that the value is valid. (lisp_to_value): Record new value if assertions are enabled. (mark_modules): Mark allocated object list. (MODULE_FUNCTION_BEGIN_NO_CATCH) (module_non_local_exit_check, module_non_local_exit_clear) (module_non_local_exit_get, module_non_local_exit_signal) (module_non_local_exit_throw): Assert thread and environment. (module_get_environment): Assert thread and runtime. (module_make_function, module_funcall, module_intern) (module_funcall, module_make_integer, module_make_float) (module_make_string, module_make_user_ptr, module_vec_get) (funcall_module, Fmodule_load): Adapt callers. (module_make_global_ref): If assertions are enabled, use the global environment to store global values. (module_free_global_ref): Remove value from global value list. * test/Makefile.in (EMACSOPT): Enable module assertions when testing modules. * test/data/emacs-module/mod-test.c (Fmod_test_invalid_store) (Fmod_test_invalid_load): New functions to test module assertions. (emacs_module_init): Bind the new functions. * test/src/emacs-module-tests.el (mod-test-emacs): New constant for the Emacs binary file. (mod-test-file): New constant for the test module file name. (module--test-assertions): New unit test.
* Some further improvements for tramp-gvfs.elMichael Albinus2017-06-111-0/+2
| | | | | | | | | | | * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-maybe-open-connection): Handle davs? properly. (tramp-gvfs-handler-askquestion): Improve `yes-or-no-p' prompt. Show question also in batch mode. Cache result. * test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion): Support completion for host names and ports.
* Fix highlighting of CSS selectors with double hyphensSimen Heggestøyl2017-06-111-0/+5
| | | | | | * lisp/textmodes/css-mode.el (css--font-lock-keywords): Fix highlighting of selectors that contain double hyphens. They would be mistaken for a variable.
* Give test files a -tests.el suffixPhilipp Stephani2017-06-094-8/+8
| | | | | | Rename a couple of test files that have the same name as the library they test. This harmonizes the naming pattern and makes it possible to have the tests directories in the load path.
* More small authors.el updatesGlenn Morris2017-06-061-1/+1
| | | | | | | | | | * admin/authors.el (authors-aliases): Fix recent addition. (authors-obsolete-files-regexps, authors-no-scan-regexps) (authors-ignored-files, authors-valid-file-names) (authors-renamed-files-alist): Additions. ; * lisp/vc/pcvs.el, test/lisp/emacs-lisp/checkdoc-tests.el: ; Fix Author headers. ; * ChangeLog.2: Fixes.
* * test/lisp/subr-tests.el (subr-tests-bug22027): Add test.Tino Calancha2017-06-051-0/+10
|
* Merge branch 'master' of git.sv.gnu.org:/srv/git/emacsMichael Albinus2017-06-052-3/+3
|\
| * Add missing dependency to test module source filePhilipp Stephani2017-06-051-1/+1
| |
| * Rework printing of module functionsPhilipp Stephani2017-06-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a FIXME in emacs-module.c. Put the printing into print.c, like other types. * src/print.c (print_vectorlike): Add code to print module functions. * src/emacs-module.c (funcall_module): Stop calling 'module_format_fun_env'. Now that module functions are first-class objects, they can be added to signal data directly. (module_handle_signal): Remove now-unused function 'module_format_fun_env'. * test/src/emacs-module-tests.el (mod-test-sum-test): Adapt unit test. * src/eval.c (funcall_lambda): Adapt call to changed signature of 'funcall_module'.
* | Some minor tweaks in tramp-tests.elMichael Albinus2017-06-051-16/+18
|/ | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-relative): Let it pass for all gfvs based methods. (tramp-test24-file-name-completion): Run method and host completion for all syntaxes only when expensive tests are enabled. Do not check host completion for gvfs based methods. (tramp--test-gvfs-p): Add optional METHOD argument. (tramp--test-afp-or-smb-p): Remove.
* Support a new CSS indentation styleSimen Heggestøyl2017-06-032-0/+21
| | | | | | | | | * lisp/textmodes/css-mode.el (css-smie-rules): Indent after property immediately followed by a newline. * test/manual/indent/css-mode.css: Add test for the change above. * test/manual/indent/scss-mode.scss: Ditto.
* Fix a bug when using format field numbersPhilipp Stephani2017-06-031-1/+2
| | | | | | | | | | Previously styled_format overwrite the argument vector. This is no longer possible because there might be more than one specification per argument. Use the existing auxiliary info array instead. * src/editfns.c (styled_format): Record arguments in the info structure instead of overwriting them. * test/src/editfns-tests.el (format-with-field): Add unit test.
* Fix with-todo-testGlenn Morris2017-06-021-2/+4
| | | | | * test/lisp/calendar/todo-mode-tests.el (with-todo-test): HOME should be a directory, not a file. Delete it when finished.
* Limit format fields to more POSIX-like specPaul Eggert2017-06-011-6/+22
| | | | | | | | | * doc/lispref/strings.texi (Formatting Strings): Don’t allow mixing numbered with unnumbered format specs. * src/editfns.c (styled_format): Don’t bother checking for field 0, since it doesn’t crash and the behavior is not specified. * test/src/editfns-tests.el (format-with-field): Adjust tests to match current doc. Add more tests for out-of-range fields.
* Minor improvements to format field numbersPaul Eggert2017-06-021-7/+3
| | | | | | | * src/editfns.c (styled_format): Allow field numbers in a %% spec. No need for a special diagnostic for field numbers greater than PTRDIFF_MAX. Reword diagnostic for field 0. * test/src/editfns-tests.el (format-with-field): Adjust to match.
* Implement field numbers in format stringsPhilipp Stephani2017-06-021-0/+18
| | | | | | | | | | | | | | | A field number explicitly specifies the argument to be formatted. This is especially important for potential localization work, since grammars of various languages dictate different word orders. * src/editfns.c (Fformat): Update documentation. (styled_format): Implement field numbers. * doc/lispref/strings.texi (Formatting Strings): Document field numbers. * lisp/emacs-lisp/bytecomp.el (byte-compile-format-warn): Adapt. * test/src/editfns-tests.el (format-with-field): New unit test.
* Correct and isolate the todo-mode test environmentStephen Berman2017-06-011-51/+59
| | | | | | | | | | | This avoids having to set todo-mode variables globally in the test file and prevents any exisiting user todo-mode files from influencing the tests. * test/lisp/calendar/todo-mode-tests.el: (with-todo-test): New macro. (todo-test-todo-quit01, todo-test-todo-quit02) (todo-test-item-highlighting): Use it.
* Improve testing of octal and hex display of raw bytesEli Zaretskii2017-06-011-6/+21
| | | | | * test/manual/redisplay-testsuite.el (test-redisplay-5-toggle) (test-redisplay-5): Add a test with a large codepoint.
* Add customizable to display raw bytes as hexVasilij Schneidermann2017-06-011-1/+26
| | | | | | | | | | | | | | | * src/xdisp.c (get_next_display_element): Dispatch used format string for unprintables based on new display-raw-bytes-as-hex variable. (display-raw-bytes-as-hex): New variable. (Bug#27122) * lisp/cus-start.el: Add defcustom form for display-raw-bytes-as-hex. * doc/emacs/display.texi: Document the new variable. * etc/NEWS: Mention display-raw-bytes-as-hex. * test/manual/redisplay-testsuite.el (test-redisplay-5-toggle) (test-redisplay-5): New tests. (test-redisplay): Call test-redisplay-5.
* Revert "Add customizable to display raw bytes as hex"Eli Zaretskii2017-06-011-26/+1
| | | | This reverts commit 7c9ac111c5e5d92e620b666893993d5dc562e483.
* Add customizable to display raw bytes as hexEli Zaretskii2017-06-011-1/+26
| | | | | | | | | | | | | | | * src/xdisp.c (get_next_display_element): Dispatch used format string for unprintables based on new display-raw-bytes-as-hex variable. (display-raw-bytes-as-hex): New variable. (Bug#27122) * lisp/cus-start.el: Add defcustom form for display-raw-bytes-as-hex. * doc/emacs/display.texi: Document the new variable. * etc/NEWS: Mention display-raw-bytes-as-hex. * test/manual/redisplay-testsuite.el (test-redisplay-5-toggle) (test-redisplay-5): New tests. (test-redisplay): Call test-redisplay-5.
* Quieten compilation of some test filesGlenn Morris2017-05-313-7/+7
| | | | | | | | * test/lisp/dired-tests.el (dired-test-bug25609): Mark unused args. * test/src/data-tests.el (binding-test-set-constant-t) (binding-test-set-constant-nil, binding-test-set-constant-keyword) (binding-test-set-constant-nil): Silence compiler. * test/src/regex-tests.el (regex-tests-BOOST): Escape char literal.
* Avoid elisp-mode test failures when source dir has multiple namesGlenn Morris2017-05-311-1/+4
| | | | | * test/lisp/progmodes/elisp-mode-tests.el (emacs-test-dir): Use the true name of the directory.
* * test/Makefile.in (.SECONDARY): Stop make deleting .elc files.Glenn Morris2017-05-311-0/+3
|
* cl-print: handle circular objects when `print-circle' is nil (Bug#27117)Noam Postavsky2017-05-311-0/+8
| | | | | | | | * lisp/emacs-lisp/cl-print.el (cl-print--currently-printing): New variable. (cl-print-object): When `print-circle' is nil, bind it to a list of objects that are currently printing to avoid printing the same object endlessly. * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-circle): New test.
* Further simplify test/Makefile, optionally load elc testsNoam Postavsky2017-05-311-28/+19
| | | | | | | | * test/Makefile.in: Use make's error ignoring feature instead of suppressing test errors with shell. Compile test files in the main make invocation instead of a recursive 'make' call. Optionally load .elc test files if TEST_LOAD_EL is set to something other than 'yes'. Remove obsolete commentary.
* Avoid subr test failure when source dir has multiple namesGlenn Morris2017-05-301-1/+2
| | | | | | | * test/lisp/subr-tests.el (subr-tests--this-file): Use the true name of the file. The following test does a string comparison of this value with that from method-files, which uses load-history, which contains true names.
* Make "make check" less verbose by defaultGlenn Morris2017-05-301-11/+25
| | | | | | | | * test/Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_ELC, am__v_ELC_) (am__v_ELC_0, am__v_ELC_1, AM_V_GEN, am__v_GEN_, am__v_GEN_0) (am__v_GEN_1, AM_V_at, am__v_at_, am__v_at_0, am__v_at_1): New, copied from lisp/Makefile.in. (%.elc, %.log): Simplify and quieten.