aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Further improve electric quote support for Markdown (Bug#24709)Philipp Stephani2017-07-091-0/+4
| | | | | | | | | | | | | Markdown sets both 'comment-start' and 'comment-use-syntax' to non-nil values. Therefore 'electric-quote-mode' recognized it as a programming mode. Fix this by first checking whether the current major mode is derived from 'text-mode'. * lisp/electric.el (electric-quote-post-self-insert-function): Treat 'text-mode' as stronger signal than comment syntax. * test/lisp/electric-tests.el (electric-quote-markdown-in-text) (electric-quote-markdown-in-code): Adapt unit tests.
* Optimize UCS normalization testsNoam Postavsky2017-07-081-51/+66
| | | | | | | | | | | | | | | | | | | Brings the the time for `ucs-normalize-part1' from 200s down to 130s. * test/lisp/international/ucs-normalize-tests.el (ucs-normalize-tests--parse-column): Use character instead of string of length 1 for terminator. Convert return value into string since all callers need that form anyway. (ucs-normalize-tests--normalization-equal-p): Rename from ucs-normalize-tests--normalize. Use dedicated buffer instead of messing with narrowing. Take string to compare against and insert it into buffer so that compare-buffer-substrings can be used instead of allocating a new string from buffer contents. (ucs-normalize-tests--normalization-chareq-p): New macro, specialized for comparing single character. (ucs-normalize-tests--rule1-holds-p) (ucs-normalize-tests--rule2-holds-p): Turn into defsubst. (ucs-normalize-tests--rule1-failing-for-partX): Use `eq' instead of `='.
* Update failing lines for UCS normalize testsNoam Postavsky2017-07-081-13/+15
| | | | | | * test/lisp/international/ucs-normalize-tests.el (ucs-normalize-tests--failing-lines-part2): Update for new admin/unidata/NormalizationTest.txt version.
* Semi-automate the procedure for updating UCS normalize test bad linesNoam Postavsky2017-07-081-32/+74
| | | | | | | | | | | | | | | | | | | | | | * test/lisp/international/ucs-normalize-tests.el: Remove incorrect commentary describing a manual procedure for producing the updated failing lines, it did not actually work. Replace it with pointer to new function which prints the updated values. (ucs-normalize-tests--rule1-holds-p): Renamed from ucs-normalize-tests--invariants-hold-p. (ucs-normalize-tests--rule2-holds-p): Renamed from ucs-normalize-tests--invariants-rule2-hold-p. (ucs-normalize-tests--rule1-failing-for-partX): Renamed from ucs-normalize-tests--invariants-failing-for-part. (ucs-normalize-tests--rule1-failing-for-lines): Renamed from ucs-normalize-tests--invariants-failing-for-lines. (ucs-normalize-tests--part2-rule1-failed-lines): New variable. (ucs-normalize-part2): Set it. (ucs-normalize-part1): Always run through to end of test before checking for failures. (ucs-normalize-tests--insert-failing-lines) (ucs-normalize-check-failing-lines): New functions, used to update the *--failing-lines-part* variables.
* Add new todo-mode.el testsStephen Berman2017-07-073-33/+457
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/calendar/todo-mode-tests.el (with-todo-test): Declare an Edebug spec. Restore pre-test-run state of test files. (todo-test--show, todo-test--move-item) (todo-test--insert-item): New functions. (todo-test-get-archive): Remove, as subsumed by todo-test--show. Adjust all callers. (todo-test--is-current-buffer): Rename from todo-test-is-current-buffer and adjust uses. (todo-test-item-highlighting): Use todo-test--show. (todo-test-revert-buffer01, todo-test-revert-buffer02) (todo-test-raise-lower-priority) (todo-test-todo-mark-unmark-category, todo-test-move-item01) (todo-test-move-item02, todo-test-move-item03) (todo-test-move-item04, todo-test-move-item05) (todo-test-toggle-item-header01) (todo-test-toggle-item-header02) (todo-test-toggle-item-header03) (todo-test-toggle-item-header04) (todo-test-toggle-item-header05) (todo-test-toggle-item-header06) (todo-test-toggle-item-header07): New tests. * test/lisp/calendar/todo-mode-resources/todo-test-1.toda: * test/lisp/calendar/todo-mode-resources/todo-test-1.todo: Modify to accommodate new tests.
* Don't skip epg tests (Bug#23561)Noam Postavsky2017-07-061-11/+2
| | | | | | | | * test/lisp/epg-tests.el (with-epg-tests): Ignore REQUIRE-PASSPHRASE parameter, since we supply the passphrase via pinentry-program for all GPG versions (as of 2017-02-28 "Fix epg-tests with dummy-pinentry program (Bug#23619)"). (epg-tests-program-alist-for-passphrase-callback): Remove.
* Fix lisp-comment-indent for single-semicolon caseNoam Postavsky2017-07-061-0/+26
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-comment-indent): Only check for open paren if we're looking at multiple comment characters. * test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-comment-indent-1) (lisp-comment-indent-2): New tests.
* Suppress timers in TrampMichael Albinus2017-07-051-19/+26
| | | | | | | | | * lisp/net/tramp.el (tramp-file-name-handler): Don't trigger timers. * test/lisp/net/tramp-tests.el (tramp-test36-asynchronous-requests): Trigger timers. (tramp-test37-recursive-load, tramp-test38-remote-load-path): Set `default-directory' to a trustworthy value.
* ; Remove unused text properties in testPhilipp Stephani2017-07-031-2/+1
| | | | | * test/lisp/electric-tests.el (electric-quote-markdown-in-code): Remove now-unused text properties.
* Use hook instead of face list to inhibit electric quotingPhilipp Stephani2017-07-031-4/+12
| | | | | | | | | | | | | | | This is more flexible and doesn't couple electric quoting to font locking. Give that 'electric-quote-code-faces' was just introduced, remove it without formal deprecation. * lisp/electric.el (electric-quote-inhibit-functions): New abnormal hook variable. (electric-quote-post-self-insert-function): Run the hook. Remove use of old 'electric-quote-code-faces' variable. * test/lisp/electric-tests.el (electric-quote-markdown-in-text) (electric-quote-markdown-in-code): Adapt unit tests.
* (Re-)activate remote tests of filenotify-tests.elMichael Albinus2017-07-031-2/+9
| | | | | | | | | * test/lisp/filenotify-tests.el (file-notify-test-remote-temporary-file-directory): Declare default host for mock method. Offer home directory for mock method if it doesn't exist. (file-notify-test09-watched-file-in-watched-dir-remote): Remove, it doesn't work reliably.
* Add absolute optional parameter to line-number-at-pos (Bug#26417)Damien Cassou2017-07-031-0/+49
| | | | | | * lisp/simple.el (line-number-at-pos): Add a second optional argument 'absolute'. * test/list/simple-tests.el: Add tests for 'line-number-at-pos'.
* Fix tramp-tests.el for hydraMichael Albinus2017-07-031-121/+111
| | | | | | | | * test/Makefile.in: Remove instrumentation for tramp-tests. * test/lisp/net/tramp-tests.el (tramp-test36-asynchronous-requests): Remove instrumentation. Wrap with a timeout. Give hydra another timer value. Set `default-directory' in timer.
* ; Instrument tramp-tests.elMichael Albinus2017-07-031-2/+2
|
* 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
|
* 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.
* 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.
* 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.
* 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'.
* 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.
* 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.
* 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
|
* 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.
* 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.
* 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.
* Quieten compilation of some test filesGlenn Morris2017-05-311-2/+2
| | | | | | | | * 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.
* 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.
* 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.
* todo-mode: don't assume an ordering of testsGlenn Morris2017-05-291-3/+7
| | | | | * test/lisp/calendar/todo-mode-tests.el (todo-test-todo-quit02) (todo-test-item-highlighting): Avoid prompting for input file.
* Add initial tests for todo-mode.elStephen Berman2017-05-293-0/+149
| | | | | | | | | *test/lisp/calendar/todo-mode-tests.el: *test/lisp/calendar/todo-mode-resources/todo-test-1.toda: *test/lisp/calendar/todo-mode-resources/todo-test-1.todo: New files. * .gitattributes: Ignore trailing whitespace in todo-mode test data files, since it is part of the todo-mode file format.
* ; Fix backslashes in python-testsNoam Postavsky2017-05-281-53/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/progmodes/python-tests.el (python-indent-after-backslash-1) (python-indent-after-backslash-2) (python-indent-after-backslash-3) (python-indent-after-backslash-4) (python-indent-after-backslash-5) (python-nav-beginning-of-statement-1) (python-nav-end-of-statement-1) (python-nav-forward-statement-1) (python-nav-backward-statement-1) (python-nav-backward-statement-2) (python-info-statement-starts-block-p-2) (python-info-statement-ends-block-p-2) (python-info-beginning-of-statement-p-2) (python-info-end-of-statement-p-2) (python-info-beginning-of-block-p-2) (python-info-end-of-block-p-2) (python-info-line-ends-backslash-p-1) (python-info-beginning-of-backslash-1) (python-info-continuation-line-p-1) (python-info-block-continuation-line-p-1) (python-info-assignment-statement-p-1) (python-info-assignment-continuation-line-p-1): Backslashes in literals should be doubled only once to produce one backslash in the buffer. If there backslashes inside a Python string literal in a Lisp literal, that would need to be doubled twice, but there are no such cases. Note that `python-tests-looking-at' takes a plain string, not a regexp.
* ; Update test for previous changeNoam Postavsky2017-05-281-4/+4
| | | | | | * test/lisp/progmodes/python-tests.el (python-indent-after-backslash-4): Indent after backslash is now python-indent-offset.
* Some tweaks, almost all for Tramp adb methodMichael Albinus2017-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-parse-device-names): Use `make-tramp-file-name'. (tramp-adb-get-device): Use `tramp-file-name-port-or-default'. (tramp-adb-maybe-open-connection): Set "prompt" property. (tramp-adb-wait-for-output): Use it. * lisp/net/tramp-cache.el (tramp-cache-print): Use `elt'. (tramp-dump-connection-properties): Check also that there are properties to be saved. Don't save "started" property of "ftp" method. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): Use `make-tramp-file-name'. * lisp/net/tramp.el (tramp-remote-file-name-spec-regexp): Host could be empty. (tramp-file-name-port-or-default): New defun. (tramp-dissect-file-name): Simplify `make-tramp-file-name' call. (tramp-handle-file-name-case-insensitive-p): Use a progress reporter. (tramp-call-process, tramp-call-process-region): Use `make-tramp-file-name'. * test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults): Revert change from 2017-05-24. (tramp-test05-expand-file-name-relative): Let it also pass for "adb" method.
* test-calc-23889: Skip test on 32-bit platformsTino Calancha2017-05-261-0/+1
| | | | | | | This test fails on some 32-bit platforms as mentioned in https://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00737.html * test/lisp/calc/calc-tests.el (test-calc-23889): Skip when the Lisp integer is not big enough.
* Adapt tramp-tests.el according to new defstructMichael Albinus2017-05-241-21/+23
| | | | | | | * test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults): Fix test according to new defstruct. (tramp-test29-environment-variables-and-port-numbers): Expect it now as passed. Cleanup at the end.
* Suppress intermittent test failure on hydraGlenn Morris2017-05-231-0/+2
| | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-test-37-obsolete-name-in-constructor): Skip on hydra.
* ; Move recent test file to correct directory (my mistake)Glenn Morris2017-05-231-0/+0
|