1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-12 16:23:57 +00:00
Commit Graph

865 Commits

Author SHA1 Message Date
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
Michael Albinus
dfad97b653 Make tramp-test29-vc-registered more robust
* test/automated/tramp-tests.el (tramp-test29-vc-registered):
Move `bzr' case down.  Skip test when `vc-create-repo' fails.
Remove instrumentation.
2015-12-25 10:45:20 +01:00
Michael Albinus
75a005d39b Instrument Tramp tests
* test/automated/tramp-tests.el (tramp-test29-vc-registered)
(tramp--test-utf8): Instrument tests.
2015-12-22 12:02:58 +01:00
Michael Albinus
f55c0f0c50 Suppress test on Mac OS X
* test/automated/tramp-tests.el (tramp--test-darwin-p): New defun.
(tramp--test-utf8): Use it.
2015-12-20 18:51:24 +01:00
Eli Zaretskii
938495317a Fix parsing netrc entries with ports
* lisp/gnus/auth-source.el (auth-source-ensure-strings): Don't
make a list out of 't'.  (Bug#22188)

* test/automated/auth-source-tests.el
(auth-source-test-netrc-parse-entry): New test.
2015-12-17 20:31:25 +02:00
Glenn Morris
93f429a324 * test/automated/simple-test.el (undo-auto-boundary-timer): Update
for recent change.
2015-12-08 00:01:31 -08:00
Paul Eggert
9b0ffdbadd Spelling fixes
* doc/misc/calc.texi (Predefined Units): Use the bland modern
scientific style for spelling the units “ampere” and
“angstrom” rather than the older style “Ampere” and
“Ångstrom”.  The latter spelling was wrong anyway (it should
have been “Ångström”).
* lisp/emacs-lisp/ert.el (ert--explain-equal-rec):
Fix misspelling of ‘atom’ in code.
2015-12-07 08:38:05 -08:00
Michael Albinus
0e574ea35e Fix minor Tramp problems found on BSD
* lisp/net/tramp-sh.el (tramp-perl-file-truename): Do not append
trailing slash.  Quote apostrophes.
(tramp-sh-handle-file-truename): Do not append trailing slash in
the "ls" case.
(tramp-get-ls-command-with-w-option): New defun.
(tramp-do-file-attributes-with-ls)
(tramp-do-directory-files-and-attributes-with-stat): Use it.

* test/automated/tramp-tests.el
(tramp-test31-special-characters-with-perl)
(tramp-test31-special-characters-with-ls)
(tramp-test32-utf8-with-perl, tramp-test32-utf8-with-ls):
Suppress also readlink.
2015-12-06 18:55:50 +01:00
Michael Albinus
8b87522925 Fix auto-revert-tests.el when filenotify isn't used
* test/automated/auto-revert-tests.el (auto-revert--wait-for-revert):
Make it working also when filenotify isn't used.
2015-12-06 09:40:23 +00:00
Ulf Jasper
0daba48887 Fix Bug#22092.
* lisp/calendar/icalendar.el (icalendar--get-unfolded-buffer):
  Clean up inconsistent line endings. (Bug#22092)
  (icalendar--clean-up-line-endings): New.
* test/automated/icalendar-tests.el (icalendar-real-world): Add test
  for Bug#22092.
2015-12-05 17:00:44 +01:00
Artur Malabarba
8ebd0a08f3 Remove copyright statements from trivial test files 2015-12-05 11:32:17 +00:00
Alex Dunn
d676e49825 Improve parsing of version strings
* lisp/subr.el (version-regexp-alist): Allow "." as priority separator
(version-to-list): More helpful error messages.
(version-to-list): ".5" is valid (update docstring).  Make
"22.8X3" invalid, as the doc string says.

* test/automated/subr-tests.el (ert-test-version-parsing): New
tests for version string processing.

Copyright-paperwork-exempt: yes
2015-12-05 11:32:01 +02:00
Artur Malabarba
30f3432e95 * lisp/character-fold.el: Remove special case-folding support
(character-fold-to-regexp): Remove special code for
case-folding.  Char-fold search still respects the
`case-fold-search' variable (i.e., f matches F).  This only
removes the code that was added to ensure that f also matched
all chars that F matched.  For instance, after this commit, f
no longer matches 𝔽.

This was necessary because the logic created a regexp with
2^(length of the string) redundant paths.  So, when a very
long string "almost" matched, Emacs took a very long time to
figure out that it didn't.  This became particularly relevant
because isearch's lazy-highlight does a search bounded by (1-
match-end) (which, in most circumstances, is a search that
almost matches).  A recipe for this can be found in bug#22090.
2015-12-04 15:12:34 +00:00
Artur Malabarba
50dce3c422 * lisp/emacs-lisp/package.el (package-unpack): Load before compiling
Reload any previously loaded package files before compiling
the package (also reload the same files after compiling).
This ensures that we have the most recent definitions during
compilation, and avoids generating bad elc files when a macro
changes and it is used in a different file from the one it's
defined in.
2015-12-03 16:13:57 +00:00
Artur Malabarba
61a4b57f1d * lisp/character-fold.el: Add back multi-char matching
(character-fold-to-regexp): Uncomment recently commented code
and make the algorithm "dummer" by not checking every possible
combination.  This will miss some possible matches, but it
greatly reduces regexp size.

* test/automated/character-fold-tests.el
(character-fold--test-fold-to-regexp): Comment out test of
functionality no longer supported.
2015-12-01 13:55:45 +00:00
Artur Malabarba
747f81861c * lisp/character-fold.el (character-fold-to-regexp)
Warn about using long strings.

* test/automated/character-fold-tests.el
(character-fold--test-lax-whitespace)
(character-fold--test-consistency): Reduce string size for tests.
2015-11-28 19:57:14 +00:00
Artur Malabarba
19141a9be6 * lisp/character-fold.el: Also play nice with case-folding
(character-fold-to-regexp): Take `case-fold-search' into account.
2015-11-28 16:21:54 +00:00
Artur Malabarba
5c5997002b * lisp/character-fold.el: Add support for multi-char matches
(character-fold-table): Now has an extra-slot. This is a second
char-table that holds multi-character matches.  See docstring for
details.
(character-fold-to-regexp): Can build branching regexps when a
character's entry the extra slot of `character-fold-table' matches the
characters that succeed it.
2015-11-28 16:21:54 +00:00
Artur Malabarba
35c7dc06ed * lisp/character-fold.el: Code simplifications
(character-fold-table): Reduce the scope of a variable.
(character-fold-to-regexp): Change logic to work directly on the
input string.  It's a little easier to understand, probably
faster, and sets us up for implementing multi-char matches.

* test/automated/character-fold-tests.el
(character-fold--test-fold-to-regexp): New test.
2015-11-28 15:06:37 +00:00
Lee Bochicchio
7fa3a0c264 * test/lisp/abbrev-tests.el: Define more tests
(abbrev-table-name-test, kill-all-abbrevs-test)
(clear-abbrev-table-test): New tests.
2015-11-27 11:11:26 +00:00
Phillip Lord
7592cb9d2a After delete, record point location in undo.
Addresses Bug #21968.

	* lisp/simple.el (undo-auto--add-boundary): Clean up code to
	better support intercalating calls.
	* src/keyboard.c,src/keyboard.h (command_loop_1): Store value of
	point and current buffer before each command.
	* src/undo.c (record_point): Now only record the point.
	* src/undo.c (prepare_record): Functionality removed form
	record_point.
	* src/undo.c (record_delete): Check if point needs recording.
	* src/undo.c (undo-boundary): Record value of point before each
	boundary.
	* test/automated/simple-test.el: New tests.

Conflicts:
	src/undo.c
2015-11-26 17:57:11 +00:00
Simen Heggestøyl
0805069ae5 Extend the test suite for json.el
* lisp/json.el (json-plist-p): Clarify docstring.

* test/automated/json-tests.el (json-tests--with-temp-buffer): New
macro.
(test-json-join, test-json-alist-p)
(test-json-plist-p, test-json-advance, test-json-peek)
(test-json-pop, test-json-skip-whitespace)
(test-json-read-keyword, test-json-encode-keyword)
(test-json-read-number, test-json-encode-number)
(test-json-read-escaped-char, test-json-read-string)
(test-json-encode-string, test-json-encode-key)
(test-json-new-object, test-json-add-to-object)
(test-json-read-object, test-json-encode-list)
(test-json-read-array, test-json-encode-array)
(test-json-read, test-json-read-from-string)
(test-json-encode): New tests.
(json-read-simple-alist): Merged into `test-json-read-object'.
(json-encode-string-with-special-chars): Merged into
`test-json-encode-string'.
(json-read-string-with-special-chars): Split into
`test-json-encode-string' and `test-json-read-from-string'.
2015-11-24 23:13:30 +01:00
Karl Fogel
8726de6663 Finish excising electric indent from `open-line'
* lisp/simple.el (open-line): Remove INTERACTIVE argument.

* test/automated/simple-test.el (open-line-indent, open-line-hook):
  Adjust accordingly.

This change finishes what my commit of Thu Nov 19 17:32:37 2015 -0600
(git commit c59353896) started.  It turns out that having INTERACTIVE
cause `post-self-insert-hook' to run (via `newline') meant `open-line'
still had the electric indent behavior, as `post-self-insert-hook'
normally contains `electric-indent-post-self-insert-function' ever
since `electric-indent-mode' has been on by default.  Tracing the code
change in `open-line' is mildly twisty, because Artur Malabarba's
earliest two commits of 24 Oct 2015 first removed the `interactive'
form entirely (git commit 6939896e2) and then restored it with the new
extra "p" already added (git commit bd4f04f86), such that there is no
single-commit diff in which one sees the second "p" appear.  Thus this
change is effectively a reversion of parts of each of those commits.

This could close bug#21884, at least until further discussion.
2015-11-21 22:50:14 -06:00
Stefan Monnier
702d76dbee Unrevert most of regexp reentrancy abort patch
The problem was in:
  * src/syntax.c (update_syntax_table_forward): Propertize even when truncated
which is hence not unreverted.
The rest is:
* src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST):
(UPDATE_SYNTAX_TABLE_FAST): Re-introduce.
All callers in regex.c changed back to the _FAST versions.

* test/automated/message-mode-tests.el: Tweak the test to rely on auto
propertization in backward-sexp.
2015-11-21 22:05:28 -05:00
Karl Fogel
c593538968 Revert `open-line' electric-indent sensitivity
* lisp/simple.el (open-line): Remove electric indent code.
  (electric-indent-just-newline): Don't declare.

* test/automated/simple-test.el (open-line-indent): Adjust test.

This partly reverts Artur Malabarba's change that added electric
indent sensitivity to `open-line' (Oct 24 22:26:27 2015 +0100, git
commit bd4f04f86), and adjusts a new test he added right afterwards
(Sat Oct 24 23:43:06 2015 +0100, git commit 207f235e3) accordingly.
However, the new INTERACTIVE argument to `open-line', which he also
added in the first commit, is not reverted here.

See the thread "Questioning the new behavior of `open-line'." on the
Emacs Devel mailing list, and in particular this message:

  From: Artur Malabarba
  Subject: Re: Questioning the new behavior of `open-line'.
  To: Karl Fogel
  Cc: David Kastrup, Pierpaolo Bernardi, emacs-devel
  Date: Wed, 18 Nov 2015 21:03:58 +0000
  Message-ID: \
    <CAAdUY-KN06pvCMy5bt3+Buk3yeKjf6n9iB2FaSTTOPpCqPwyhA@mail.gmail.com>

  https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01707.html
2015-11-19 17:32:43 -06:00
Dmitry Gutov
1f07a61ee3 ; Fix breakage in elisp-mode-tests.el 2015-11-16 19:15:58 +02:00
Artur Malabarba
4f19767dfa * lisp/faces.el (faces--attribute-at-point): Fix an issue
Previous code would signal an error when the face at point was
a manually built list of attributes such as '(:foregroud "white").

* test/automated/faces-tests.el (faces--test-color-at-point): Add a test
2015-11-15 18:43:28 +00:00
Paul Eggert
478262d6cc Change test name to avoid spellcheck issue. 2015-11-14 11:51:20 -08:00
Eli Zaretskii
7ad01cb68a Avoid signaling an error in 'describe-symbol'
* lisp/help-fns.el (describe-symbol): Avoid errors when the symbol
exists as a function/variable/face/etc., but is undocumented.

* test/automated/help-fns.el (help-fns-test-describe-symbol): New
test.
2015-11-14 19:27:52 +02:00
Juanma Barranquero
93e7db13d6 * test/automated/simple-test.el: Add test for bug#20698 (bug#21885)
(simple-test--transpositions): New macro.
(simple-transpose-subr): New test.

Backport.
2015-11-13 22:00:59 +02:00
Juanma Barranquero
6e5186e8a7 * test/automated/keymaps-test.el: Fix test to make it repeatable
(keymap-store_in_keymap-FASTINT-on-nonchars): Reset Buffer-menu-mode-map
entry to its initial value to make the test repeatable in interactive
sessions (assuming it doesn't fail and crashes Emacs, of course).
2015-11-12 23:42:23 +01:00
Artur Malabarba
0c92826611 * test/automated/cl-lib-tests.el (cl-lib-struct-constructors): Small fix 2015-11-12 23:32:40 +00:00