aboutsummaryrefslogtreecommitdiffstats
path: root/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
* dired-do-shell-command: Fix check for wildcardsTino Calancha2017-07-031-0/+44
| | | | | | * lisp/dired-aux.el (dired-do-shell-command): Replace just '?', '*' and '`?' i.e., keep the whitespaces. * test/lisp/dired-aux-tests.el (dired-test-bug27496): Add test.
* Electric quotes: Improve support for Markdown mode (Bug#24709)Philipp Stephani2017-07-021-0/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new user option 'electric-quote-context-sensitive'. If non-nil, have ' insert an opening quote if sensible. Also introduce a new variable 'electric-quote-code-faces'. Major modes such as 'markdown-mode' can add faces to this list to treat text as inline code and disable electric quoting. * lisp/electric.el (electric-quote-context-sensitive): New user option. (electric-quote-code-faces): New variable. (electric-quote-post-self-insert-function): Treat ' as ` if desired and applicable; disable electric quoting for given faces. * test/lisp/electric-tests.el (electric-quote-opening-single) (electric-quote-closing-single, electric-quote-opening-double) (electric-quote-closing-double) (electric-quote-context-sensitive-backtick) (electric-quote-context-sensitive-bob-single) (electric-quote-context-sensitive-bob-double) (electric-quote-context-sensitive-bol-single) (electric-quote-context-sensitive-bol-double) (electric-quote-context-sensitive-after-space-single) (electric-quote-context-sensitive-after-space-double) (electric-quote-context-sensitive-after-letter-single) (electric-quote-context-sensitive-after-letter-double) (electric-quote-context-sensitive-after-paren-single) (electric-quote-context-sensitive-after-paren-double) (electric-quote-markdown-in-text) (electric-quote-markdown-in-code): New unit tests.
* ; Instrument tramp-tests.elMichael Albinus2017-07-021-3/+10
|
* ; Instrument tramp-tests.elMichael Albinus2017-07-021-3/+16
|
* ; Fix last commitMichael Albinus2017-07-011-1/+1
|
* ; Instrument test/Makefile.in for tramp-tests output on hydraMichael Albinus2017-07-011-1/+2
|
* Release Tramp 2.3.2Michael Albinus2017-06-301-0/+4
| | | | | | | | | | | * doc/misc/tramp.texi (Android shell setup): Show default file name. Structure section. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.3.2". * test/lisp/net/tramp-tests.el (tramp-test-temporary-file-directory): Offer home directory for mock method if it doesn't exist.
* Don't redundantly cl-print arglist in function docstring againNoam Postavsky2017-06-291-1/+1
| | | | | | | * lisp/emacs-lisp/cl-print.el (cl-print-object): Don't print arglist part of docstring. * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-1): Update test accordingly.
* Improve ert backtrace recordingNoam Postavsky2017-06-291-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Change ert to use the new `backtrace-frames' function instead of collecting frames one by one with `backtrace-frame'. Additionally, collect frames starting from `signal' instead the somewhat arbitrary "6 from the bottom". Skipping 6 frames would skip the expression that actually caused the signal that triggered the debugger. Possibly 6 was chosen because in the case of a failed test, the triggering frame is an `ert-fail' call, which is not so interesting. But in case of a test throwing an error, this drops the `error' call which is too much. * lisp/emacs-lisp/debug.el (debugger-make-xrefs): Remove. * lisp/emacs-lisp/ert.el (ert--make-xrefs-region): Bring in relevant code from `debugger-make-xrefs'. (ert--print-backtrace): Add DO-XREFS parameter, delegate to `debugger-insert-backtrace'. (ert--run-test-debugger): Record the backtrace frames starting from the instigating `signal' call. (ert-run-tests-batch): Pass nil for `ert--print-backtrace's new DO-XREFS parameter. (ert-results-pop-to-backtrace-for-test-at-point): Pass t as DO-XREFS to `ert--print-backtrace' and remove call to `debugger-make-xrefs'. * test/lisp/emacs-lisp/ert-tests.el (ert-test-record-backtrace): Check the backtrace list instead of comparing its string representation. Expect `signal' to be the first frame.
* Improve timer handling when Tramp accepts outputMichael Albinus2017-06-291-91/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-compat.el: Avoid compiler warning. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler): Remove lock machinery. * lisp/net/tramp.el (tramp-locked, tramp-locker): Move up. (tramp-file-name-handler): Add lock machinery from `tramp-sh-file-name-handler'. Allow timers to run. (tramp-accept-process-output): Remove nasty workaround. Suppress timers. * test/lisp/net/tramp-tests.el (shell-command-sentinel): Suppress run in tests. (tramp--instrument-test-case-p): New defvar. (tramp--instrument-test-case): Use it in order to allow nested calls. (tramp--test-message, tramp--test-backtrace): New defsubst, will be used for occasional test instrumentation. (tramp-test00-availability, tramp-test31-vc-registered): Use them. (tramp-test28-shell-command) (tramp--test-shell-command-to-string-asynchronously): Suppress nasty messages. Don't overwrite sentinel. (tramp-test36-asynchronous-requests): Rewrite major parts. Expect :passed.
* Revert "Add current-line in simple.el"Nicolas Petton2017-06-191-49/+0
| | | | This reverts commit ae98cdf9431604d0f722f1db217ca06debfbb7b6.
* Add current-line in simple.elDamien Cassou2017-06-191-0/+49
| | | | | * lisp/simple.el (current-line): New function. * test/list/simple-tests.el: Add tests for current-line.
* * test/Makefile.in: Don't suppress test failure for single tests.Noam Postavsky2017-06-171-4/+6
|
* Allow local variables section to begin with a square bracketPhilipp Stephani2017-06-171-0/+39
| | | | | | | | | | Fixes Bug#27391. * lisp/international/mule.el (find-auto-coding): Fix regular expression for "Local Variables" section. * test/lisp/international/mule-tests.el (find-auto-coding--bug27391): Add unit test.
* 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.