1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-24 10:38:38 +00:00
Commit Graph

896 Commits

Author SHA1 Message Date
Artur Malabarba
6e7129551c * lisp/emacs-lisp/package.el (package--with-response-buffer):
Fix some macro locals leaking into body.  (Bug#22440)

* test/automated/package-test.el (package-test-signed):
Manually check all possible values of `package-check-signature'.
2016-05-18 18:07:50 -03:00
Juri Linkov
1fe1e0a8e7 * lisp/char-fold.el: Rename from character-fold.el.
* lisp/replace.el (replace-char-fold): Rename from replace-character-fold.
* test/automated/char-fold-tests.el: Rename from character-fold-tests.el.
http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00529.html
2016-05-17 23:55:38 +03:00
Dmitry Gutov
1a5a05cf6f Do not mistake colon at the end of regexp for slash symbol
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Check the parse state in the "Symbols with special characters"
rule (bug#23515).
2016-05-12 03:18:45 +03:00
Dmitry Gutov
922c7a3e48 Rework xref-query-replace-in-results
* lisp/progmodes/xref.el (xref-query-replace-in-results): Collect
all xrefs from the buffer first, then delegate most of the
processing to the value returned by xref--buf-pairs-iterator.
(xref--buf-pairs-iterator): New function.  Return an "iterator"
which partitions returned markers into buffers, and only processes
markers from one buffer at a time.  When an xref is out of date,
skip it with a message instead of signaling error (bug#23284).
(xref--outdated-p): Extract from xref--buf-pairs-iterator.  Trim
CR from both strings before comparing.
(xref--query-replace-1): Remove the variable current-buf, no need
to track it anymore.  Simplify the filter-predicate and search
functions accordingly.  Iterate over buffer-markers pairs returned
by the iterator, and call `perform-replace' for each of them.  Use
multi-query-replace-map (bug#23284).  Use `switch-to-buffer' every
time after the first, in order not to jump between windows.

* test/automated/xref-tests.el
(xref--buf-pairs-iterator-groups-markers-by-buffers-1)
(xref--buf-pairs-iterator-groups-markers-by-buffers-2)
(xref--buf-pairs-iterator-cleans-up-markers): New tests.
2016-05-05 03:26:04 +03:00
Glenn Morris
adc80b7e23 ; * test/automated/xref-tests.el: Add copyright and license. 2016-05-03 19:36:40 -07:00
Dmitry Gutov
4d8fd9cf33 Handle "empty line" regexp in xref searches
* lisp/progmodes/xref.el (xref--collect-matches-1): Stop after one
match if re-search-forward doesn't move point (bug#23426).

* test/automated/xref-tests.el
(xref-collect-matches-finds-an-empty-line-regexp-match):
Uncomment test.
2016-05-04 01:59:29 +03:00
Dmitry Gutov
f559b374a3 Add tests for xref-collect-matches
* test/automated/xref-tests.el: New file.  Add tests for
xref-collect-matches.
2016-05-04 01:38:02 +03:00
Philipp Stephani
8f36614512 Add electric-quote-string unit test
* test/automated/electric-tests.el (electric-quote-string): New test.
2016-05-02 08:59:25 -07:00
Lele Gaifax
fa7886a46f Add new keywords of Python 3.5
Python 3.5, released in mid September 2015, introduced a few new
keywords to better support asynchronous code, "async" and "await"
in particular. See https://www.python.org/dev/peps/pep-0492/ for
details. (Bug#21783)
* lisp/progmodes/python.el (python-rx-constituents): Add async
def/for/with as block-start and async def as defun.
* lisp/progmodes/python.el (python-font-lock-keywords): Add async
def/for/with as keyword.
* test/automated/python-tests.el (python-indent-after-async-block-1,
python-indent-after-async-block-2, python-indent-after-async-block-3,
python-nav-beginning-of-defun-3): New tests to test indentation and
navigation for the async keyword.
2016-04-26 13:50:26 -04:00
Michael Albinus
1b98a68b66 Fix Bug#20637. Do not merge to master
* lisp/vc/vc-hooks.el (vc-state, vc-working-revision):
Use `vc-backend' instead of `vc-responsible-backend'.  (Bug#20637)

* test/automated/vc-tests.el (vc-test--state)
(vc-test--working-revision): Deactivate now failing checks.
2016-04-14 20:28:18 +02:00
Paul Eggert
80128a7849 Fix stability confusion in sort-tests
Problem reported by Philipp Stephani (Bug#23205).
* test/automated/sort-tests.el:
(sort-tests--insert-words-sort-and-compare):
Don’t assume that reversing a sorted list is the same
as sorting with the reverse predicate.  This is not true
for stable sorts when items compare equal.
2016-04-06 01:22:32 -07:00
Michael Albinus
df441b362c Fix OS X specific settings in tramp-tests
* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Use it.

* lisp/net/tramp.el (tramp-get-local-locale): New defun.

* test/automated/tramp-tests.el (tramp--test-darwin-p): Remove.
(tramp--test-utf8): Improve settings of coding systems.
Do not use `tramp--test-darwin-p' anymore.  (Bug#22145)
2016-03-31 11:45:45 +02:00
Nicolas Petton
3a13472ade Fix map-put and map-delete for alists (Bug#23105)
* lisp/emacs-lisp/map.el (map-put): Do not bind the evaluated place
expression to a new symbol.
* test/lisp/emacs-lisp/map-tests.el: Add a regression test.
2016-03-25 15:11:23 +01:00
Philipp Stephani
90fb9b38dd Add customization option for using UTF-8 coordinates in xt-mouse
* lisp/xt-mouse.el (xterm-mouse-utf-8): New customization option.
(xterm-mouse--read-coordinate): New function to replace
`xterm-mouse--read-utf8-char'; uses UTF-8 only if enabled.
(xterm-mouse--read-number-from-terminal): Adapt to new name.
(xterm-mouse-tracking-enable-sequence)
(xterm-mouse-tracking-disable-sequence): Replace constants with
functions, mark constants as obsolete.
(xterm-mouse--tracking-sequence): New helper function.
(turn-on-xterm-mouse-tracking-on-terminal): Use new functions;
enable UTF-8 only if customization option says so; store UTF-8
flag in terminal parameter.  (Bug#23009)

* test/automated/xt-mouse-tests.el: Add tests for xt-mouse.el.
2016-03-25 13:17:38 +03:00
Michael Albinus
dca240a70d Suppress some Tramp tests for OSX, do not merge with master
* test/automated/tramp-tests.el (tramp--test-darwin-p): New defun.
(tramp--test-utf8): Use it.  (Bug#22145)
2016-03-17 20:33:51 +01:00
Dmitry Gutov
1d686c2afb (ruby-interpolation-inside-another-interpolation): New failing test
* test/automated/ruby-mode-tests.el
(ruby-interpolation-inside-another-interpolation):
New failing test.
2016-03-16 01:48:33 +02:00
Glenn Morris
218ae59019 * test/automated/package-test.el (package-test-signed): Tweak skip
condition, for hydra.
2016-03-15 16:24:26 -04:00
Dmitry Gutov
366ec7719f Allow using the left shift operator without spaces on both sides
* lisp/progmodes/ruby-mode.el (ruby-singleton-class-p): Rename to
ruby-verify-heredoc, reverse the meaning of the return value, and
short-circuit if preceded by a symbol not separated by whitespace.

* test/automated/ruby-mode-tests.el (ruby-no-heredoc-left-shift)
(ruby-no-heredoc-class-self): New tests.
2016-03-09 17:22:56 +02:00
Dmitry Gutov
6e63b3e997 Guard against nested percent literals
* lisp/progmodes/ruby-mode.el
(ruby-syntax-propertize-percent-literal):
Don't check the syntax status.
(ruby-syntax-propertize): Check it here.  And also guard against
being in a larger percent literal.

* test/automated/ruby-mode-tests.el
(ruby-no-nested-percent-literals): New test.
2016-03-07 05:07:34 +02:00
Ulf Jasper
8b01e6969f Prevent infinite loop on not-well-formed xml. (Bug#16344)
* lisp/xml.el (xml-parse-tag-1): Prevent inifinite loop. (Bug#16344)
* test/automated/xml-parse-tests.el (xml-parse-tests--bad-data): Add
  test cases for Bug#16344.
2016-03-02 19:03:27 +01:00
Alan Third
100346aa22 Add the missing test case for the previous patch
lisp/dabbrev.el (dabbrev--substitute-expansion): Return EXPANSION after
any processing.
lisp/dabbrev.el (dabbrev-expand): Set EXPANSION to the return value of
DABBREV--SUBSTITUTE-EXPANSION.
test/automated/dabbrev-tests.el (dabbrev-expand-test): Test for bug#1948.
2016-03-02 17:21:39 +00:00
Michael Albinus
f5d14353c2 Fix targets in test/automated/Makefile.in
* test/automated/Makefile.in: Use $(SELECTOR_DEFAULT) also for
empty target and target all.
2016-03-01 10:58:01 +01:00
Michael Albinus
c582def527 Further adaptions in file-notify-tests.el for w32notify
* test/automated/file-notify-tests.el
(file-notify--test-read-event-timeout, file-notify--test-timeout):
Decrease values.
(file-notify-test03-autorevert)
(file-notify-test04-file-validity)
(file-notify-test05-dir-validity): Run tests also for w32notify.
(file-notify-test08-watched-file-in-watched-dir):
Adapt expected events for w32notify.
2016-02-23 13:51:36 +01:00
Nicolas Richard
6620944f83 (cl-union): Do not ignore :test argument when lists are equal.
* cl-seq.el (cl-union): Do not ignore :test argument when lists are equal.

* test/automated/cl-seq-tests.el: New file (bug#22729).
2016-02-23 14:38:30 +11:00
Michael Albinus
a9c48d5c9e Additional fixes for file notification
* lisp/filenotify.el (top): Require 'cl when compiling.
(file-notify--event-watched-file): New defun.
(file-notify--rm-descriptor, file-notify-callback):
Handle case of several monitors running in parallel.

* test/automated/file-notify-tests.el
(file-notify--test-event-test): Simplify test.
(file-notify--test-with-events): Get rid of outer definition.
Check also results of tests performed in callbacks.
(file-notify-test02-events): No wrapping when calling
`file-notify-rm-watch'.  No special checking for callback tests.
(file-notify-test07-backup): Adapt expected events for gfilenotify.
(file-notify-test08-watched-file-in-watched-dir): Improve.
2016-02-22 18:52:37 +01:00
Michael Albinus
5baa001cec Fix Bug#22736
* lisp/filenotify.el (file-notify-callback): Use the proper
descriptor when calling the callback.  (Bug#22736)

* test/automated/file-notify-tests.el
(file-notify--test-event-handler): Deactivate trace.
(file-notify-test08-watched-file-in-watched-dir): Bind
`file-notify--test-tmpfile' temporarily in `dir-callback'.
2016-02-21 09:58:55 +01:00
Michael Albinus
6de26a78de Report also result in `file-notify--test-event-handler' 2016-02-20 14:20:54 +01:00
Michael Albinus
5d17ae7d46 Improve file-notify-test08-watched-file-in-watched-dir
* test/automated/file-notify-tests.el (file-notify--test-desc2):
New variable.
(file-notify--test-cleanup): Use it.
(file-notify--test-event-handler): Enable trace.
(file-notify-test08-watched-file-in-watched-dir): Tag it as
:expensive-test.  Rewrite callbacks to use
`file-notify--test-event-handler'.  Read events in loop.  Check
`file-notify--test-results'.
(file-notify-test08-watched-file-in-watched-dir): Fix docstring.
2016-02-20 14:04:36 +01:00
Tassilo Horn
2a75f64dd2 New filenotify test for bug#22736
* test/automated/file-notify-tests.el
(file-notify-test08-watched-file-in-watched-dir):
(file-notify--test-desc1): New filenotify test for bug#22736
2016-02-20 08:44:51 +01:00
Michael Albinus
37eae51767 Some fixes in file-notify-tests.el
* test/automated/file-notify-tests.el
(file-notify--test-with-events-check)
(file-notify--test-with-events-explainer): New defuns.
(file-notify--test-with-events): Use it.
(file-notify-test07-backup): Fix docstring.  Some of the
backends fire two `changed' events.  Backup by rename doesn't
work for kqueue.
2016-02-08 10:54:43 +01:00
Michael Albinus
d5a10aefee Fix Bug#22557
* lisp/filenotify.el (file-notify-callback): Do not send a
`stopped' event in case of backup by renaming.  (Bug#22557)

* test/automated/Makefile.in: Use $(SELECTOR_EXPENSIVE) for
all targets but check and check-maybe.

* test/automated/file-notify-tests.el
(file-notify--test-read-event-timeout): New defconst.
(file-notify--deftest-remote, file-notify--wait-for-events)
(file-notify-test02-events)
(file-notify-test04-file-validity)
(file-notify-test06-many-events): Use it.
(file-notify--test-cleanup): Make it more robust.  Delete also
backup file.
(file-notify-test07-backup): New test.
2016-02-07 19:30:01 +01:00
Eli Zaretskii
49e57490d0 Fix file-notify-test on MS-Windows
* test/automated/file-notify-tests.el (file-notify--test-timeout):
Reduce w32notify timeout to 10 sec.
(file-notify-test06-many-events): Call read-event after each
rename, to keep the w32notify backend happy in batch mode.
(Bug#22534)
2016-02-06 21:53:38 +02:00
Michael Albinus
1eaf68f368 * test/automated/file-notify-tests.el (file-notify-test06-many-events):
Reduce the number of iterations to 250 in case of w32notify.
2016-02-05 22:55:28 +01:00
Michael Albinus
7bf54d0115 Backport kqueue integration from master
* configure.ac (--with-file-notification): Add kqueue.
(top): Remove special test for "${HAVE_NS}" and
${with_file_notification}, this is handled inside gfilenotify
tests.  Add kqueue tests.  Use NOTIFY_CFLAGS and NOTIFY_LIBS
instead of library specific variables.  Add error message for
gfile on Nextstep.

* doc/lispref/os.texi (File Notifications): Add kqueue as backend.
Fix some glitches in the example.

* etc/NEWS: Mention kqueue.

* lisp/filenotify.el (file-notify--library)
(file-notify-descriptors, file-notify-callback)
(file-notify-add-watch, file-notify-rm-watch)
(file-notify-valid-p): Add kqueue support.
(file-notify--rm-descriptor): Remove WHAT arg.

* src/Makefile.in: Use NOTIFY_CFLAGS and NOTIFY_LIBS.

* src/emacs.c (main): Call globals_of_kqueue and syms_of_kqueue.

* src/inotify.c (inotifyevent_to_event): Extract file name from
watch_object if the event doesn't provide it.
(Finotify_add_watch): Add file name to watch_object.

* src/keyboard.c (make_lispy_event): Check also for HAVE_KQUEUE.

* src/kqueue.c: New file.

* src/lisp.h: Declare extern globals_of_kqueue and syms_of_kqueue.

* test/automated/file-notify-tests.el
(file-notify--test-expected-events): Remove.
(file-notify--test-cleanup): Do not set that variable.
(file-notify--test-timeout) Use different timeouts for
different libraries.
(file-notify--test-library): New defun.
(file-notify--test-event-test): Make stronger checks.
(file-notify--test-with-events): EVENTS can also be a list of
lists.  Flush outstanding events before running the body.
Make timeout heuristically depend on the number of events.
(file-notify-test01-add-watch, file-notify-test02-events)
(file-notify-test04-file-validity, file-notify-test05-dir-validity):
Rewrite in order to call file monitors but directory monitors.
(file-notify-test02-events, file-notify-test04-file-validity): Do
not skip cygwin tests.  Add additional test for file creation.
Adapt expected result for different backends.
(file-notify-test03-autorevert): Some of the tests don't work for
w32notify.
(file-notify-test06-many-events): New test.
2016-01-22 19:56:09 +01:00
Phillip Lord
549a765efe Enable test selector from command line
* test/automated/Makefile.in: Change variable manipulation to avoid
  over-writing selector.
2016-01-15 22:11:39 +00:00
Michael Albinus
058f8a8d55 check-maybe shall run only default tests
* test/automated/Makefile.in (check, check-expensive): Depend on
mostlyclean.
(check-maybe): Re-run only default tests.
(check-doit): Use code of check-maybe.
(mostlyclean): Move *.log files away.
2016-01-14 09:11:14 +01:00
Glenn Morris
0ae1a144a8 * test/automated/core-elisp-tests.el
(core-elisp-tests-1-defvar-in-let): Add a custom type.
2016-01-12 20:04:49 -05:00
Dmitry Gutov
1f6898d051 test/automated/vc-hg.el: Support out-of-tree build
* test/automated/vc-hg.el
(vc-hg-annotate-extract-revision-at-line-with-filename)
(vc-hg-annotate-extract-revision-at-line-with-both):
Don't refer to source-directory.
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00755.html
2016-01-12 00:17:49 +03:00
Michael Albinus
3adb56e7b2 Minor change in tramp-tests.el
* test/automated/tramp-tests.el (tramp-test29-vc-registered):
Use `dired-uncache' instead of a Tramp internal function.
2016-01-11 19:43:36 +01:00
Michael Albinus
1089dc98b7 Handle too long commands in Tramp
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-do-file-attributes-with-ls): Send sequence of commands, in
order to not exceed shell command line limit.

* test/automated/tramp-tests.el (tramp--test-darwin-p): Remove.
(tramp--test-utf8): Include Arabic file name, again.
2016-01-10 13:07:21 +01:00
Dmitry Gutov
cca0f93359 ; Account for spaces before the filename 2016-01-10 04:38:34 +03:00
Dmitry Gutov
c71e1e86df Use short date for 'hg annotate', and output the author
* lisp/vc/vc-hg.el (vc-hg-annotate-command):
Change '-d' to '-dq'.  (Bug#21805)
(vc-hg-annotate-switches): Default to "-u" "--follow".
(vc-hg-annotate-re): Update to recognize the short date format
and the optional username.
(vc-hg-annotate-time)
(vc-hg-annotate-extract-revision-at-line): Update accordingly.

* test/automated/vc-hg.el: New file.
2016-01-10 04:13:01 +03:00
Michael Albinus
90fd798aac Fix coding system for Tramp on OS X.
* lisp/net/tramp-compat.el: Require ucs-normalize.

* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Set coding system to `utf-8-hfs' for Mac OS X.

* test/automated/tramp-tests.el (tramp-test29-vc-registered):
Flush directory properties when needed.
(tramp--test-utf8): Include Chinese file name, again.
2016-01-09 13:55:02 +01:00
Michael Albinus
5810ac3a10 Suppress Chinese file name test for OSX in tramp-tests.el
* test/automated/tramp-tests.el (tramp--test-utf8):
Remove instrumentation.  Suppress Chinese file name test for OSX.
2016-01-08 10:09:37 +01:00
Michael Albinus
f5c762c878 Additional changes for "make check-expensive"
* CONTRIBUTE : Encourage use of ":tags '(:expensive-test)".
Explain make target `check-expensive'.

* etc/NEWS: Mention new make target `check-expensive'.

* test/automated/Makefile.in (check-doit): New target.
(check, check-expensive): Use it.
2016-01-05 09:47:41 +01:00
Michael Albinus
4e62197a64 Introduce check-expensive tests.
* Makefile.in (check-expensive):
* test/automated/Makefile.in (check-expensive): New target.

* test/automated/auto-revert-tests.el
(auto-revert-test01-auto-revert-several-files):
* test/automated/file-notify-tests.el (file-notify--deftest-remote):
* test/automated/tramp-tests.el (tramp-test26-process-file)
(tramp-test27-start-file-process, tramp-test28-shell-command)
(tramp-test29-vc-registered)
(tramp-test31-special-characters-with-stat)
(tramp-test31-special-characters-with-perl)
(tramp-test31-special-characters-with-ls)
(tramp-test32-utf8-with-stat, tramp-test32-utf8-with-perl)
(tramp-test32-utf8-with-ls, tramp-test33-asynchronous-requests)
(tramp-test35-unload): Tag the tests as :expensive-test.
2016-01-04 23:28:07 +01:00
Michael Albinus
6300655ec9 Minor fixes in tramp-tests.el
* test/automated/tramp-tests.el (tramp-test26-process-file):
Move point properly.
(tramp-test29-vc-registered): Work with relative file names.
2016-01-04 19:25:39 +01:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Paul Eggert
c9dfe5121c Spelling fix
* test/automated/url-parse-tests.el:
(url-generic-parse-url/same-document-reference):
Rename from url-generic-parse-url/same-decument-reference.
2015-12-26 15:40:00 -08:00
Alain Schneble
4b5b3985ad Include the tests for the URL parsing fixes 2015-12-26 14:53:08 +01:00