1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00
Commit Graph

2263 Commits

Author SHA1 Message Date
Noam Postavsky
e6608010d7 ; Add thing-at-point-looking-at test (Bug#35708)
* test/lisp/thingatpt-tests.el (thing-at-point-looking-at): New test.
2019-07-05 21:50:37 -04:00
Juanma Barranquero
bfc7c6e0d3 * test/lisp/url/url-file-tests.el (url-file): Fix for POSIX filenames. 2019-06-28 15:22:00 +02:00
Noam Postavsky
e62ad04963 Fix sgml-mode handling of quotes within parens (Bug#36347)
* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize): Use
syntax-ppss-table if set.  This is only needed on the release branch,
on master the caller (syntax-propertize) already does this.
(sgml-mode): Set syntax-ppss-table to sgml-tag-syntax-table.  This
correctly classifies parens as punctuation, so they won't confuse the
parser.
* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
New test copied from master, with two cases added for this bug.
2019-06-25 18:58:23 -04:00
Juanma Barranquero
81535eeadb * test/lisp/progmodes/python-tests.el (python-virt-bin): Doc fix. 2019-06-17 03:12:45 +02:00
Juanma Barranquero
9d48979ca8 Fix Python tests depending on system-type
* test/lisp/progmodes/python-tests.el (python-virt-bin): New function.
(python-shell-calculate-exec-path-2)
(python-shell-calculate-exec-path-3)
(python-shell-calculate-exec-path-4)
(python-shell-with-environment-1, python-shell-with-environment-2):
Use it.
2019-06-17 02:48:21 +02:00
Juanma Barranquero
fcf6cc3177 Fix problem with wdired test when symlinks cannot be created.
* test/lisp/wdired-tests.el (wdired-test-symlink-name):
Skip test if 'make-symbolic-link' fails for whatever reason;
that's not what's being tested.
2019-06-16 21:57:44 +02:00
Michael Albinus
f87a9e359e Fix accidential change in tramp-tests; do not merge with master
* lisp/net/trampver.el: Change version to "2.3.5.26.3".
(customize-package-emacs-version-alist): Add Tramp version
integrated in Emacs 26.3.

* test/lisp/net/tramp-tests.el (tramp-test42-auto-load):
Add skip for w32.
2019-06-15 21:38:11 +02:00
Juanma Barranquero
200f63cfa5 tramp-test42-auto-load: Add expected-result.
* test/lisp/net/tramp-tests.el (tramp-test42-auto-load):
Expect a failed result if remote file access is not enabled,
as it happens while doing the test on Windows.
2019-06-15 07:23:25 +02:00
Juanma Barranquero
7a8f22b004 * test/lisp/url/url-file-tests.el (url-file): Use file:///, not file://. 2019-06-15 05:29:03 +02:00
Eli Zaretskii
746d42f52b Remove failing test erroneously added in backport
* test/src/thread-tests.el (threads-test-bug33073): Remove
test which cannot work on the emacs-26 branch.  Do not merge
to master.  Reported by Juanma Barranquero <lekktu@gmail.com>.
2019-06-14 09:40:40 +03:00
Eli Zaretskii
fdd1b3e020 Avoid assertion violation when comparing with main-thread
* src/thread.c (unmark_main_thread): New function.
* src/lisp.h (unmark_main_thread): Prototype it.
* src/alloc.c (garbage_collect_1): Call it after sweeping.
(Bug#33073)

* test/src/thread-tests.el (threads-test-bug33073): New test.
2019-06-10 12:52:31 +02:00
Noam Postavsky
134edc1036 Warn about wrong number of args for subrs (Bug#35767)
* lisp/emacs-lisp/bytecomp.el (byte-compile-callargs-warn): Don't
assume byte-compile-fdefinition will return non-nil.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-warn-wrong-args)
(bytecomp-warn-wrong-args-subr): New tests.
2019-05-30 18:46:07 -04:00
Noam Postavsky
5f01af6c8e Use plain symbols for eieio type descriptors (Bug#29220)
Since Emacs 26, eieio objects use a class record (with circular
references) as the type descriptor of the object record.  This causes
problems when reading back an object from a string, because the class
record is not `eq' to the canonical one (which means that read objects
don't satisfy the foo-p predicate).
* lisp/emacs-lisp/eieio.el (make-instance): As a (partial) fix, set
the record's type descriptor to a plain symbol for the type descriptor
when eieio-backward-compatibility is non-nil (the default).
* lisp/emacs-lisp/eieio-core.el (eieio--object-class): Call
eieio--class-object on the type tag when eieio-backward-compatibility
is non-nil.
(eieio-object-p): Use eieio--object-class instead of
eieio--object-class-tag.
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
(eieio-test-persist-hash-and-vector)
(eieio-test-persist-interior-lists): Make into functions.
(eieio-persist-hash-and-vector-backward-compatibility)
(eieio-persist-hash-and-vector-no-backward-compatibility)
(eieio-test-persist-interior-lists-backward-compatibility)
(eieio-test-persist-interior-lists-no-backward-compatibility): New
tests which call them, eieio-backward-compatibility let-bound.
2019-05-30 18:46:07 -04:00
Noam Postavsky
7dab3ee7ab Recognize single quote attribute values in nxml and sgml (Bug#35381)
* lisp/textmodes/sgml-mode.el (sgml-specials): Add single quote.
(sgml-syntax-propertize-rules): Handle single quote.
* test/lisp/nxml/nxml-mode-tests.el (nxml-mode-font-lock-quotes): New
test.
* test/lisp/textmodes/sgml-mode-tests.el
(sgml-delete-tag-bug-8203-should-not-delete-apostrophe): Now passes.
2019-05-09 06:42:40 -04:00
Noam Postavsky
ca14dd1d46 Fix nxml-get-inside (Bug#32003)
The change from 2016-01-16 "lisp/nxml: Use syntax-tables for comments"
made nxml-get-inside return non-nil for any string or comment,
including attribute strings.  This caused incorrect and therefore
indentation.
* lisp/nxml/nxml-rap.el: Update commentary to reflect changes to
nxml-mode parsing.
(nxml-get-inside): Only return non-nil when inside comments and
generic strings, not normal quote-delimited strings.
* test/lisp/nxml/nxml-mode-tests.el: New tests.
2019-05-09 06:42:40 -04:00
Vitalie Spinu
1c6484e975 Fix incorrect cloning of eieio-instance-inheritor objects (Bug#34840)
* lisp/emacs-lisp/eieio-base.el (clone): Unbound slots of
  eieio-instance-inheritor objects as documented in the docs string
  and implemented in the original eieio implementation.
2019-05-08 11:12:29 +02:00
Vitalie Spinu
37436fe6d3 Fix cloning of eieio-named objects (Bug#22840)
* lisp/emacs-lisp/eieio-base.el (clone): Correctly set the name of the
  cloned objects from eieio-named instances.
2019-05-07 13:45:00 +02:00
Noam Postavsky
93912baefd Be more careful about indent-sexp going over eol (Bug#35286)
* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Only go over multiple
sexps if the end of line is within a sexp.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(indent-sexp-stop-before-eol-comment)
(indent-sexp-stop-before-eol-non-lisp): New tests.
2019-04-22 12:49:36 -04:00
Basil L. Contovounesios
a4ad7bed18 Fix off-by-one-link error in image--set-property
* lisp/image.el (image--set-property): Ensure new value is set even
in the unlikely case that the plist is empty.  Fix off-by-one-link
error when deleting a property. (bug#35285)
* test/lisp/image-tests.el: New file.
(image--set-property): New test.
2019-04-18 16:07:55 +01:00
Dmitry Gutov
1dff097393 Backport: js--re-search-backward-inner: Fix infloop
Fix JS indentation infloop reported in
https://github.com/mooz/js2-mode/issues/513.

* lisp/progmodes/js.el (js--re-search-backward-inner): Account for
multiline string literals.
* test/manual/indent/js.js: New test example.

(cherry picked from commit b01a4295c2)
2019-02-25 19:14:20 +03:00
Stefan Monnier
3f4b8e9a29 * src/data.c (Fmake_local_variable): Fix bug#34318
Revert part of ed962f2b8a.

* test/src/data-tests.el (data-tests-make-local-forwarded-var):
Add corresponding test.
2019-02-12 16:33:23 -05:00
Michael Albinus
13b586d7a7 Adapt filenotify-tests for emba
* .gitlab-ci.yml (test): Add EMACS_EMBA_CI variable.

* test/lisp/filenotify-tests.el (file-notify-test03-events)
(file-notify-test05-file-validity)
(file-notify-test06-dir-validity)
(file-notify-test07-many-events)
(file-notify-test09-watched-file-in-watched-dir): Adapt tests for emba.
2019-01-07 17:07:19 +01:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Paul Eggert
f4ea746451 cl-make-random-state was not copying its arg
Problem reported by Xu Chunyang (Bug#33731).
* lisp/emacs-lisp/cl-extra.el (cl-make-random-state):
Use copy-sequence, not copy-tree, so that the record is copied.
* test/lisp/emacs-lisp/cl-extra-tests.el:
(cl-extra-test-cl-make-random-state): New test.
2018-12-19 13:42:47 -08:00
Glenn Morris
fda43a7bef Skip a vc-bzr test if run as root
* test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-faulty-bzr-autoloads):
Skip this test when run as root.  This works around a race
condition in root-specific code in vc-mode-line when deleting a file.

; Do not merge to master, instead fix vc-mode-line there.
2018-12-19 15:06:18 -05:00
Glenn Morris
4370b8ebd9 ; Copyright year fix
No need to merge to master
2018-12-19 08:29:21 -08:00
Chris Feng
305aca0a0a Backport: Handle unread-command-events consistently (bug#23980)
* src/keyboard.c (read_char): Events put into `unread-command-events'
with the form (t . EVENT) should always have the t stripped when read
out.
* test/src/keyboard-tests.el: New tests for `unread-command-events'.

(cherry picked from commit 1f3f4b1296)
2018-12-19 18:06:37 +02:00
Glenn Morris
4c6c327d0c Restrict downcasing in elisp xref tests (bug#25534)
The tests happen to not fail at the moment because find-library-name
now has an extra feature, find-library--from-load-history, which
happens to do a case-insensitive regexp match; but still it seems
better not to rely on this.

* test/lisp/progmodes/elisp-mode-tests.el (xref--case-insensitive):
New variable.
(xref-elisp-test-run, emacs-test-dir): Only downcase if the
filesystem seems to be case-insensitive.
2018-12-18 21:18:31 -05:00
Rob Browning
ab8ed41859 Avoid test failures if directory name looks like a regexp
Taken from <https://sources.debian.org/patches/emacs/1:26.1+1-1>
* test/lisp/ibuffer-tests.el (ibuffer-filter-inclusion-3):
* test/lisp/net/tramp-tests.el (tramp-test42-remote-load-path):
Regexp-quote file names to avoid failures with directory names
of the form "build/emacs-i87jK3/emacs-26.1+1/...".
2018-12-18 15:34:01 -05:00
Glenn Morris
fa953b58af Fix an epg test for recent GnuPG versions (bug#33439)
* test/lisp/epg-tests.el (epg-decrypt-1):
Tell recent GnuPG (e.g. 2.2.11) not to worry about missing MDC.
2018-12-14 20:09:02 -05:00
Michael Albinus
a6ef167b8d * test/README: Explain $REMOTE_TEMPORARY_FILE_DIRECTORY. 2018-11-13 09:44:06 +01:00
Gemini Lasswell
c3cf85b1c1 Add regression test for Bug#33014
Backport from master.
* test/src/eval-tests.el:
(eval-tests-byte-code-being-evaluated-is-protected-from-gc): New test.
(eval-tests-33014-var): New variable.
(eval-tests-33014-func, eval-tests-33014-redefine): New functions.
2018-10-30 21:17:34 -07:00
Eli Zaretskii
e133b63062 Avoid adverse side effects of fixing bug#21824
* test/src/buffer-tests.el
(overlay-modification-hooks-deleted-overlay): New test.

* src/buffer.c (report_overlay_modification): Don't bypass all
the overlay-modification hooks; instead, invoke each function
only if the buffer associated with the overlay is the current
buffer.  (Bug#30823)
2018-09-15 12:21:12 +03:00
Leo Liu
1e3b3fa615 Fix (thing-at-point 'list) regression (Bug#31772)
* lisp/thingatpt.el (thing-at-point-bounds-of-list-at-point): Revert
  to pre 26.1 behavior.  Return whole sexp at point if no enclosing
  list.
  (list-at-point): New optional arg to ignore comments and strings.

* test/lisp/thingatpt-tests.el
  (thing-at-point-bounds-of-list-at-point): Fix and augment tests.
2018-09-14 22:38:58 +08:00
Michael Albinus
ac7936cb8f Rename thread-alive-p to thread-live-p
* doc/lispref/threads.texi (Basic Thread Functions): Use thread-live-p.

* etc/NEWS: 'thread-alive-p' has been renamed to 'thread-live-p'.

* src/thread.c (thread_live_p): Rename from thread_alive_p.  Adapt
all callees.
(Fthread_live_p): Rename from Fthread_alive_p.
(syms_of_threads): Make thread-alive-p an alias of thread-live-p.

* test/src/thread-tests.el (all): Replace `thread-alive-p' by
`thread-live-p'.
(threads-live): Rename from `threads-alive'.
2018-08-31 10:47:03 +02:00
Noam Postavsky
a1e615618d * test/lisp/calc/calc-tests.el (calc-imaginary-i): New test. 2018-08-29 22:47:00 -04:00
Sergey Vinokurov
54fb383af6 Fix detection of freed emacs_values (Bug#32479)
* src/emacs-module.c (module_free_global_ref): Compare a value to be
freed with all entries of the list.

* test/data/emacs-module/mod-test.c (Fmod_test_globref_free): New
function.
(emacs_module_init): Make it accessible from Lisp.
* test/src/emacs-module-tests.el (mod-test-globref-free-test): New
test which uses it.
2018-08-25 18:57:56 -04:00
Noam Postavsky
769d0cdaa9 ; Fix out-of-tree build for mod-test.so
* test/Makefile.in: Don't look for emacs-module.h in $(srcdir), since
it is generated.
2018-08-25 18:57:28 -04:00
Paul Eggert
34e75c144e Add comment about floating point test
* test/src/data-tests.el (data-tests--float-greater-than-fixnums):
New constant.
(data-tests-=, data-tests-<, data-tests->, data-tests-<=)
(data-tests->=, data-tests-min): Use it.
2018-08-13 09:37:09 -07:00
Michael Albinus
184229766f Backport fix for Bug#32226
* test/lisp/shadowfile-tests.el: Set Tramp variables for hydra.
(shadow-test06-literal-groups, shadow-test07-regexp-groups)
(shadow-test08-shadow-todo, shadow-test09-shadow-copy-files):
Use `set-visited-file-name' instead of setting the value in
`buffer-file-name' directly.
(shadow-test08-shadow-todo, shadow-test09-shadow-copy-files):
Test for writable temporary directory.  Suppress errors in
cleanup.  (Bug#32226)
2018-08-12 18:15:24 +02:00
Filipp Gunbin
5e42c349a0 Fix bugs in `auth-source-netrc-parse-one'.
* lisp/auth-source.el (auth-source-netrc-parse-one): Ensure that match
  data is not overwritten in `auth-source-netrc-parse-next-interesting'.
  Ensure that blanks are skipped before and after going over comments
  and eols.
* test/lisp/auth-source-tests.el (auth-source-test-netrc-parse-one): New test.

(cherry picked from commit 60ff810144)
2018-08-10 08:36:24 -04:00
Eli Zaretskii
71c92d8913 Fix copying text properties by 'format'
* src/editfns.c (styled_format): Add the spec beginning index
to the info recorded for each format spec, and use it to
detect the case that a format spec and its text property end
where the next spec with another property begins.  (Bug#32404)

* test/src/editfns-tests.el (format-properties): Add tests for
bug#32404.
2018-08-09 18:08:35 +03:00
Glenn Morris
00fb127031 * test/lisp/wdired-tests.el (wdired-test-unfinished-edit-01): Fix typo. 2018-08-08 19:58:29 -04:00
Juri Linkov
cc233365a9 New function read-answer (Bug#31782)
* lisp/emacs-lisp/map-ynp.el (read-answer-short): New defcustom.
(read-answer): New function.
* lisp/subr.el (assoc-delete-all): New function.
* etc/NEWS: Announce them.

* lisp/dired.el (dired-delete-file): Use read-answer.
(dired--yes-no-all-quit-help): Remove function.
(dired-delete-help): Remove defconst.

(backported from master, "New function read-answer (bug#30073)" and
"Respect non-saved value of `read-short-answer' (Bug#31782)")
2018-08-04 11:37:39 -04:00
Stephen Berman
951c5a127f Fix wdired test failure when byte compiled (bug#32318)
* test/lisp/wdired-tests.el: Require wdired.  Defvar dired-query
to silence byte-compiler.
2018-07-31 00:42:52 +02:00
Stephen Berman
0252f7311f * test/lisp/wdired-tests.el (wdired-test-symlink-name): New test. 2018-07-30 14:12:50 +02:00
Stephen Berman
67679f0c08 Add initial tests for wdired.el
* test/lisp/wdired-tests.el: New file.
2018-07-29 00:22:02 +02:00
Noam Postavsky
8579105393 Don't fail to indent-sexp before a full sexp (Bug#31984)
* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Only signal error if the
initial forward-sexp fails.  Suppress scan-error forn any of the
forward-sexp calls after that.
* test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-cant-go): New
test.
2018-07-27 19:41:39 -04:00
Michael Albinus
2585fcb1d7 File Shadowing is not available on MS Windows
* doc/emacs/files.texi (File Shadowing): File Shadowing is not
available on MS Windows.

* test/lisp/shadowfile-tests.el (shadow-test00-clusters)
(shadow-test01-sites, shadow-test02-files)
(shadow-test03-expand-cluster-in-file-name)
(shadow-test04-contract-file-name, shadow-test05-file-match)
(shadow-test06-literal-groups, shadow-test07-regexp-groups)
(shadow-test08-shadow-todo, shadow-test09-shadow-copy-files):
Skip under MS Windows.
2018-07-25 17:34:55 +02:00
Noam Postavsky
1b4b96597c Fix indent-sexp of #s(...) (Bug#31984)
* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Look for a sexp that
ends after the current line.
* test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-go): New test.
2018-07-21 21:07:07 -04:00