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

4176 Commits

Author SHA1 Message Date
Andrea Corallo
75e8ee728f Merge remote-tracking branch 'savannah/master' into HEAD 2020-11-07 16:21:36 +01:00
Mauro Aranda
423b6b6229 Add test for recent change in enable-theme
* test/lisp/custom-tests.el (custom-test-enable-theme-keeps-settings):
Enabling a theme should not change the theme settings, so test for
that.  See
https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00232.html
2020-11-07 09:53:21 -03:00
Stefan Kangas
6df06148e5 Add some more tests for keymap.c
* test/src/keymap-tests.el (keymap-make-keymap)
(keymap-make-sparse-keymap, keymap-keymapp)
(keymap-keymap-parent, keymap-keymap-set-parent/returns-parent)
(keymap-copy-keymap/is-equal, keymap-copy-keymap/is-not-eq)
(keymap-lookup-key, keymap-apropos-internal)
(keymap-apropos-internal/predicate): New tests.
(keymap-tests--make-keymap-test): New defun.
2020-11-07 07:55:50 +01:00
Mattias Engdegård
6e9564f09a Fix javac message parsing column number off-by-one
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
'javac': Column numbers are 1-based by default; remove subtraction and
η-reduce.  Translate regexp to rx (mechanised).
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data):
Adapt 'javac' test cases to the change.
2020-11-06 17:16:00 +01:00
Mattias Engdegård
093a6bec52 Update gdb-mi-tests
* test/lisp/progmodes/gdb-mi-tests.el (gdb-mi-parse-value):
Make test pass after the change in gdb-mi-decode-strings default value.
2020-11-06 15:37:17 +01:00
Mattias Engdegård
0c5eb1c7e7 Reduce integer-output-format to print-integers-as-characters
The variable now only controls whether characters are printed, not
the radix.  Control chars are printed in human-readable syntax
only when special escapes such as ?\n are available.  Spaces,
formatting and combining chars are excluded (bug#44155).
Done in collaboration with Juri Linkov.

* src/character.c (graphic_base_p):
* src/print.c (named_escape): New functions.
(print_object): Change semantics as described above.
(syms_of_print): Rename integer-output-format.  Update doc string.
* doc/lispref/streams.texi (Output Variables):
* etc/NEWS:
* test/src/print-tests.el (print-integers-as-characters):
Rename and update according to new semantics.  The test now passes.
2020-11-06 13:55:32 +01:00
Stefan Kangas
1efcec2717 Add more tests for where-is-internal
* test/src/keymap-tests.el (keymap-where-is-internal)
(keymap-where-is-internal/firstonly-t)
(keymap-where-is-internal/menu-item)
(keymap-where-is-internal/advertised-binding)
(keymap-where-is-internal/advertised-binding-respect-remap)
(keymap-where-is-internal/remap)
(keymap-where-is-internal/shadowed): New tests.
(keymap-where-is-internal/preferred-modifier-is-a-string):
Rename from keymap-where-is-internal-test.
2020-11-06 04:59:37 +01:00
Stefan Kangas
38a109e58c ; Silence byte-compiler warnings in tests
* test/lisp/emacs-lisp/easy-mmode-tests.el (easy-mmode--minor-mode):
* test/lisp/progmodes/cperl-mode-tests.el (cperl-bug30393):
Silence byte-compiler.
2020-11-05 18:25:40 +01:00
Michael Albinus
334e2ab440 Still fixes for Tramp directory-files-*
* lisp/net/tramp.el (tramp-handle-directory-files):
* lisp/net/tramp-adb.el
(tramp-adb-handle-directory-files-and-attributes): Fix COUNT.

* lisp/net/tramp-crypt.el (tramp-crypt-handle-directory-files):
Implement COUNT.

* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-byte-array-to-string):
* lisp/net/tramp-integration.el (tramp-eshell-directory-change):
Use `nbutlast'.

* lisp/net/tramp-rclone.el (tramp-rclone-handle-delete-directory)
(tramp-rclone-handle-delete-file): Reorder cache flushing.
(tramp-rclone-handle-directory-files):
Use `tramp-compat-directory-files'.

* lisp/net/tramp-sh.el (tramp-sh-handle-directory-files-and-attributes):
Fix NOSORT and COUNT.

* lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Fix NOSORT.

* test/lisp/net/tramp-tests.el (tramp--test-share-p): New defun.
(tramp-test05-expand-file-name-relative): Use it.
(tramp-test16-directory-files)
(tramp-test19-directory-files-and-attributes): Strengthen test.
(tramp-test20-file-modes): Simplify check.
2020-11-05 17:36:04 +01:00
Stefan Kangas
37c0208aaa ; Silence byte-compiler warning in xdisp-tests.el
* test/src/xdisp-tests.el (xdisp-tests--minibuffer-scroll): Silence
byte-compiler.
2020-11-05 15:44:17 +01:00
Eric Abrahamsen
7fad12c59b New gnus-search library
This library provides a fundamental reworking of the search
functionality previously found in nnir.el.  It uses class-based search
engines to interface with external searching facilities, and a parsed
search query syntax that can search multiple engines.

* lisp/gnus/gnus-search.el: New library containing search
functionality for Gnus.
* doc/misc/gnus.texi: Document.
* lisp/gnus/gnus-group.el (gnus-group-make-search-group,
gnus-group-read-ephemeral-search-group): Remove references to nnir,
change meaning of prefix argument, change values of nnselect-function
and nnselect-args.
* lisp/gnus/nnselect.el: Replace references to nnir
(nnselect-request-article): Use gnus-search functions, and search
criteria.
(nnselect-request-thread, nnselect-search-thread): Use gnus-search
thread search.
(gnus-summary-make-search-group): Switch to use gnus-search function
and arguments.
* test/lisp/gnus/search-tests.el: Tests for new functionality.
2020-11-03 21:20:17 -08:00
Michael Albinus
2fffc1dfdf Some Tramp fixes for directory-files-* and delete-*
* lisp/files.el (delete-directory): Simplify check for trash.

* lisp/net/ange-ftp.el (ange-ftp-delete-file): Implement TRASH.

* lisp/net/tramp-compat.el (tramp-compat-directory-files)
(tramp-compat-directory-files-and-attributes)
(tramp-compat-directory-empty-p): New defaliases.

* lisp/net/tramp.el (tramp-handle-directory-files-and-attributes)
(tramp-skeleton-delete-directory):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory): Use them.

* lisp/net/tramp-sh.el (tramp-sh-handle-directory-files-and-attributes):
Implement COUNT.

* test/lisp/net/tramp-tests.el (tramp-test14-delete-directory):
Do not run trash test for ange-ftp.
(tramp-test16-directory-files)
(tramp-test19-directory-files-and-attributes): Check COUNT argument.
2020-11-03 18:47:32 +01:00
Harald Jörg
84f74136d3 cperl-mode: Fix indentation for Emacs 26
* lisp/progmodes/cperl-mode.el (cperl-mode): Add a fix
which is only required for Emacs versions older than 27.

* test/lisp/progmodes/cperl-mode-tests.el (cperl-bug30393):
Add a test to verify correct indentation (bug#30393).
2020-11-03 15:28:40 +01:00
Harald Jörg
2800513af5 cperl-mode: Skip a test for older Emacsen (preparing for ELPA)
* test/lisp/progmodes/cperl-mode-tests.el (cperl-bug37127):
Skip this test for older Emacsen.  The bug has been fixed
in Emacs, but outside of CPerl mode, and therefore will not
be available for older versions via ELPA.
2020-11-03 00:11:12 +01:00
Michael Albinus
e654b41c6f Fix some glitches in recent directory-files-* changes
* doc/lispref/files.texi (Contents of Directories):
Fix description of directory-files, directory-empty-p and
directory-files-and-attributes.

* etc/NEWS: Fix entry for directory-files-and-attributes.  Fix typos.

* lisp/dired.el (directory-empty-p): Move function from here ...

* lisp/files.el (directory-empty-p): ... to here.

* lisp/net/ange-ftp.el (ange-ftp-directory-files): Call `nreverse' later.

* lisp/net/tramp.el (tramp-handle-directory-files):
* lisp/net/tramp-adb.el
(tramp-adb-handle-directory-files-and-attributes): Do not call
`nreverse'.

* src/dired.c (Fdirectory_files)
(Fdirectory_files_and_attributes): Fix docstrings.

* test/src/dired-tests.el: Removed.  Tests moved to
test/lisp/dired-tests.el.

* test/lisp/dired-tests.el (dired-test-bug27899): Tag it :unstable.
(dired-test-directory-files)
(dired-test-directory-files-and-attributes): New tests.
2020-11-02 17:56:06 +01:00
Michael Albinus
554495006e Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into master 2020-11-02 17:53:00 +01:00
Arthur Miller
0806075520 Add directory-empty-p and new argument COUNT for directory-files-*
* doc/lispref/files.texi (Contents of Directories): Mention COUNT
argument of directory-files.  Add directory-empty-p.

* etc/NEWS: Mention directory-empty-p and directory-files changes.

* lisp/dired.el (directory-empty-p): New defun.

* lisp/net/ange-ftp.el (ange-ftp-directory-files)
(ange-ftp-directory-files-and-attributes):
* lisp/net/tramp.el (tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes):
* lisp/net/tramp-adb.el
(tramp-adb-handle-directory-files-and-attributes):
* lisp/net/tramp-rclone.el (tramp-rclone-handle-directory-files):
* lisp/net/tramp-sh.el (tramp-sh-handle-directory-files-and-attributes):
* lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Add new COUNT
argument.

* src/dired.c (directory_files_internal): Implement new
RETURN_COUNT argument.
(Fdirectory_files, Fdirectory_files_and_attributes): Add new COUNT
argument.

* src/lisp.h (directory_files_internal): Add RETURN_COUNT to declaration.

* src/sysdep.c (list_system_processes): Add Qnil to
directory_files_internal call.

* test/src/dired-tests.el (directory-files-and-attributes-tests):
New file.
2020-11-02 12:38:27 +01:00
Lars Ingebrigtsen
5cea77af41 Partially revert previous define-minor-mode change
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring):
Only document the values we want to support, not the ones we
actually support.
(define-minor-mode): Partially revert to previous behaviour.
2020-11-02 10:17:08 +01:00
Stefan Kangas
8ad9932f11 Don't bind standard-output in substitute-command-keys
This fixes a regression with regards to the old C version of
substitute-command-keys.

* lisp/help.el (substitute-command-keys): Don't bind standard-output.
See Bug#39149.
* test/lisp/help-tests.el
(help-tests--was-in-buffer): New variable.
(help-substitute-command-keys/menu-filter-in-correct-buffer): New
test.
2020-11-01 18:58:12 +01:00
Stefan Kangas
ce1856ec09 Insert describe-map-tree header into original buffer
* lisp/help.el (describe-map-tree): Insert header into the original
buffer, not in standard-output.
* test/src/keymap-tests.el
(describe-buffer-bindings/header-in-current-buffer)
(describe-buffer-bindings/returns-nil): New tests.
Ref: https://debbugs.gnu.org/39149#31
2020-11-01 15:53:43 +01:00
Andrea Corallo
933fd76f8f * test/src/comp-tests.el (compile-forms): Fix missing lexical binding. 2020-11-01 15:17:00 +01:00
Andrea Corallo
e1a168f9a7 * Add some 'cond-rw' pass related tests
* test/src/comp-tests.el (comp-tests-cond-rw-checked-function):
	Declare var.
	(comp-tests-cond-rw-checker-val): New function.
	(comp-tests-cond-rw-checker-type): Declare var.
	(comp-tests-cond-rw-checker-type): New function.
	(comp-tests-cond-rw-0-var): Declare var.
	(comp-tests-cond-rw-0, comp-tests-cond-rw-1, comp-tests-cond-rw-2)
	(comp-tests-cond-rw-3, comp-tests-cond-rw-4)
	(comp-tests-cond-rw-5): New testcases.
2020-11-01 15:17:00 +01:00
Lars Ingebrigtsen
2a4b0da28c Make minor mode ARG work as documented
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring):
Clarify when minor modes are switched on/off when called from lisp
(bug#44341).
(define-minor-mode): Make calls from Lisp switch the mode on/off
as documented.
2020-11-01 15:00:44 +01:00
Andrea Corallo
047fe3292d * Rework some native compiler test infrastructure
* test/src/comp-tests.el (comp-tests-map-checker): New function
	returning a list holding checker results.
	(comp-tests-tco-checker, comp-tests-fw-prop-checker-1)
	(comp-tests-pure-checker-1, comp-tests-pure-checker-2): Make use
	of `comp-tests-map-checker'.
2020-11-01 14:27:42 +01:00
Michael Albinus
06585bb939 Trash remote files to local trash (Bug#44216)
* doc/misc/tramp.texi (Frequently Asked Questions): Add trashing.

* lisp/net/tramp-adb.el (tramp-adb-handle-delete-directory)
(tramp-adb-handle-delete-file):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory)
(tramp-gvfs-handle-delete-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-delete-directory)
(tramp-sh-handle-delete-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-delete-directory)
(tramp-smb-handle-delete-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-delete-directory)
(tramp-sudoedit-handle-delete-file): Implement local trash.  (Bug#44216)

* lisp/net/tramp-crypt.el (tramp-crypt-handle-delete-directory)
(tramp-crypt-handle-delete-file): Do not trash.

* lisp/net/tramp.el (tramp-skeleton-delete-directory): New defmacro.

* test/lisp/net/tramp-tests.el (tramp-test07-file-exists-p)
(tramp-test14-delete-directory): Add trashing.
2020-11-01 12:42:29 +01:00
Juri Linkov
5d9e456c3e New variable integer-output-format to print integers as characters (bug#44155)
* doc/lispref/streams.texi (Output Variables): Add integer-output-format.

* src/print.c (print_object): In case of Lisp_Int, print integers
as characters when Vinteger_output_format is Qt, and in hex format
when Vinteger_output_format is 16.
(Vinteger_output_format): New variable.

* test/src/print-tests.el (print-integer-output-format): New test.
2020-10-31 22:11:02 +02:00
Stefan Kangas
f9cac26dc1 * test/README: Document TEST_BACKTRACE_LINE_LENGTH. 2020-10-31 20:27:39 +01:00
Andrea Corallo
f7f5d59ab4 Merge remote-tracking branch 'savannah/master' into HEAD 2020-10-31 15:00:00 +00:00
Mattias Engdegård
0cbcc6223a 'assoc' is not side-effect-free; constprop its pure subset
Since a supplied test function can do anything, assoc is not
side-effect-free (bug#44018).  However, with only two arguments it is
pure and should be optimised accordingly.

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Remove 'assoc'.
(byte-optimize-assoc): Constant-propagate through 2-arg assoc calls.
* test/lisp/emacs-lisp/bytecomp-tests.el
(byte-opt-testsuite-arith-data): Add test cases.
2020-10-31 14:31:43 +01:00
Stefan Monnier
7103192cd2 * src/xdisp.c (syms_of_xdisp) <"scroll-minibuffer-conservatively">: New var
Fix bug#44070, which causes the minibuffer display to jump upon minor edit

(redisplay_window): Obey it.
* lisp/simple.el (end-of-buffer): Obey it.

* test/src/xdisp-tests.el (xdisp-tests--in-minibuffer): New macro,
extracted from `xdisp-tests--minibuffer-resizing`.
(xdisp-tests--minibuffer-resizing): Use it.
(xdisp-tests--minibuffer-scroll): New test.
2020-10-31 09:07:53 -04:00
Mattias Engdegård
c3a20804a8 Trim and explain set of safe forms for 'unsafep' (bug#44018)
* lisp/emacs-lisp/unsafep.el:
Add comment explaining the policy for which forms can be considered
'safe' in the sense of unsafep.  Remove ones that didn't make the cut:

 play-sound-file (large attack surface)
 catch, throw (alter program flow, inject data)
 replace-regexp-in-string (execute arbitary code)
 error, signal (deceptive messages)

* test/lisp/emacs-lisp/unsafep-tests.el (unsafep-tests--unsafe):
Add test cases.
* etc/NEWS: Announce the change.
2020-10-31 13:42:07 +01:00
Mattias Engdegård
a78c6141bc Parse GDB/MI results directly instead of going via JSON (bug#44173)
Translating GDB/MI into JSON is an unnecessary and fragile detour
that made it hard to deal with octal escapes in strings correctly.
Parse GDB/MI directly instead.

* lisp/progmodes/gdb-mi.el (gdb-mi-decode-strings): Adjust doc string.
(gdb-mi-decode, gud-gdbmi-marker-filter): Remove gdb-mi-decode.
(gdb-jsonify-buffer): Remove.
(gdb-mi--parse-tuple-or-list, gdb-mi--parse-c-string)
(gdb-mi--parse-value, gdb-mi--parse-result-or-value)
(gdb-mi--parse-results, gdb-mi--fix-key, gdb-mi--extend-fullname)
(gdb-mi--c-string-from-string): New functions.
(gdb-json-read-buffer, gdb-json-string, gdb-json-partial-output):
Rename to gdb-mi--read-buffer, gdb-mi--from-string and
gdb-mi--partial-output respectively.  Remove useless FIX-LIST
argument.  FIX-KEY is now a symbol, not a string. All callers updated.
(gdb-tooltip-print, gdbmi-bnf-log-stream-output, gdb-internals)
(gdb-console, gdb-done-or-error, gdb-get-source-file-list)
(gdb-get-prompt, gdb-get-source-file):
Use gdb-mi--c-string-from-string instead of 'read'.
* test/lisp/progmodes/gdb-mi-tests.el: New file.
2020-10-31 13:42:07 +01:00
Jared Finder
2a6337a6c4 Fix unit tests broken by changes to xt-mouse.el
* test/lisp/xt-mouse-tests.el (xt-mouse-tracking-basic)
(xt-mouse-tracking-utf-8): Update expected escape sequence.
2020-10-31 09:57:00 +02:00
Eli Zaretskii
8800d8c640 Revert "Temporarily mark two failing tests"
This reverts commit a8426f4672.
A proper fix for the test is about to be installed shortly.
2020-10-31 09:56:14 +02:00
Stefan Monnier
7500abaa8e * lisp/simple.el (blink-matching-open): Fix bug#37127
Don't call `syntax-propertize` from within narrowing

* lisp/progmodes/cperl-mode.el (cperl-forward-re): Revert last patch,
since it is now redundant.

* test/lisp/progmodes/cperl-mode-tests.el (cperl-bug37127):
Remove unused var; fix test so it really catches the previous bug;
tweak the code to use mode-agnostic commands so it also works in `perl-mode`.
2020-10-30 18:10:06 -04:00
Lars Ingebrigtsen
bb60887b0d Revert "Adjust python tests after fix for bug#39398"
This reverts commit c6fb23873a.

The code is tweaked to be more backwards-compatible.
2020-10-30 16:10:57 +01:00
Stefan Kangas
0f1f795fc8 ; Fix typo in my last commit
* test/lisp/emacs-lisp/text-property-search-tests.el
(text-property-search--pos-test): Fix typo.
2020-10-30 14:16:25 +01:00
Harald Jörg
101a3b7830 Suppress a misleading message when closing a paren in a regex
* lisp/progmodes/cperl-mode.el (cperl-forward-re): Suppress an
error message about "End of string/RE not found" when we are
at the end of a narrowed buffer where the end of a RE is
temporarily unavailable (Bug#37127).

* test/lisp/progmodes/cperl-mode-tests.el (cperl-bug37127):
Add a test to verify that the message is suppressed when
inappropriate, but appears when the RE *is* incomplete.
2020-10-30 13:24:01 +01:00
Stefan Kangas
b295174210 Clarify point position after text-property-search
* lisp/emacs-lisp/text-property-search.el
(text-property-search-forward, text-property-search-backward): Doc fix
to clarify placement of point after search.
* test/lisp/emacs-lisp/text-property-search-tests.el
(text-property-search--pos-test): New defun.
(text-property-search-forward-point-at-beginning)
(text-property-search-backward-point-at-end): New test.
2020-10-30 13:23:31 +01:00
Lars Ingebrigtsen
617f70bc7d `format-time' can now do sub-second times
* doc/lispref/os.texi (Time Parsing): Document it.

* lisp/calendar/time-date.el (format-seconds): Allow formatting
sub-second times.
2020-10-30 12:10:53 +01:00
Hugh Daschbach
4f6b7a0149 * test/lisp/net/dbus-tests.el (dbus-test09-get-managed-objects): Expand test. 2020-10-30 08:59:11 +01:00
Harald Jörg
96e371b44a cperl-mode: Make timeout test more robust
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-mode-test-bug-10483): Increase the timeout to 2 seconds
and mark the test as expensive.  Also, suppress it for Emacs
versions below 28, where the test times out though the function
works in manual tests.  (Bug#44317)
2020-10-29 22:44:47 +01:00
Stefan Monnier
7b02d9ba48 * lisp/progmodes/tcl.el: Better match Tcl string formation rules (bug#39277)
(tcl--word-delimiters): New const.
(tcl--syntax-of-quote): New function.
(tcl-syntax-propertize-function): Use them.
(tcl-mode): Enable `syntax-propertize-multiline`.

* test/manual/indent/tcl.tcl: New file.
2020-10-29 13:38:59 -04:00
Michael Albinus
372739b406 Handle several children of PATH in dbus-managed-objects-handler
* lisp/net/dbus.el (dbus-managed-objects-handler): Handle several
children of PATH.  (Bug#44298)

* src/dbusbind.c (xd_signature, xd_append_arg): Check object path.

* test/lisp/net/dbus-tests.el (dbus-test09-get-managed-objects):
Tag it :expensive-test.  Remove superfluous check.
2020-10-29 16:56:40 +01:00
Hugh Daschbach
1fb85fb138 * test/lisp/net/dbus-tests.el (dbus-test09-get-managed-objects): New test. 2020-10-29 12:16:45 +01:00
Lars Ingebrigtsen
63b8f25b88 Disable mml-sec-tests on MacOS
* test/lisp/gnus/mml-sec-tests.el (test-conf): Disable tests on
MacOS (bug#44259).
2020-10-28 11:54:53 +01:00
Lars Ingebrigtsen
c6fb23873a Adjust python tests after fix for bug#39398 2020-10-28 09:13:53 +01:00
Stefan Kangas
94ddb1987e ; Fix license statement in several files
Add the line "This file is part of GNU Emacs."
2020-10-28 03:41:55 +01:00
Stefan Kangas
039ffaf69f Use lexical-binding in netrc.el and add tests
* lisp/net/netrc.el: Use lexical-binding.
(netrc-file): Remove redundant :group arg.
* test/lisp/net/netrc-resources/authinfo:
* test/lisp/net/netrc-resources/services:
* test/lisp/net/netrc-tests.el: New files.
2020-10-28 03:24:18 +01:00
Glenn Morris
a8426f4672 Temporarily mark two failing tests
; Persistently failing tests can cause problems for automated builds,
; and make it harder to spot new failures.

* test/lisp/xt-mouse-tests.el (xt-mouse-tracking-basic)
(xt-mouse-tracking-utf-8): Currently failing.
2020-10-27 08:35:10 -07:00
Mattias Engdegård
cde72637df Fix sunrise and sunset calculation (bug#44237)
* lisp/calendar/solar.el (solar-moment): Use initial values for binary
search that won't end the loop prematurely and yield incorrect
answers.
* test/lisp/calendar/solar-tests.el: New file.
2020-10-27 12:33:51 +01:00
Mattias Engdegård
f971a612a9 Don't rely on bignums in ntlm.el
Since ntlm.el is distributed as a separate package in GNU ELPA and
should be able to run on older Emacs versions without bignums,
we cannot make use of them here.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2020-10/msg01665.html.
Instead, we add a small poor man's bignum implementation.

* lisp/net/ntlm.el (ntlm--bignat-of-int, ntlm--bignat-add)
(ntlm--bignat-shift-left, ntlm--bignat-mul-byte, ntlm--bignat-mul)
(ntlm--bignat-of-string, ntlm--bignat-of-digits)
(ntlm--bignat-to-int64): New.
(ntlm--time-to-timestamp): Use the ntlm--bignat- functions instead
of Lisp integers.
* test/lisp/net/ntlm-tests.el: New file.
2020-10-27 12:25:57 +01:00
Lars Ingebrigtsen
eb57ae0844 Fix time-test error on machines with mail
* test/lisp/time-tests.el (time-tests-display-time-update): There
may be mail on the machine (bug#44241).
2020-10-26 21:23:55 +01:00
Lars Ingebrigtsen
b8b18cf34a Implement a :predicate parameter for globalized minor modes
* doc/lispref/modes.texi (Defining Minor Modes): Describe the new
:predicate keyword (bug#44232).

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Allow a new :predicate keyword.
(easy-mmode--globalized-predicate-p): New function.
2020-10-26 19:15:36 +01:00
Andrea Corallo
fd9e9308d2 Make native compiler tollerant to redefined primitives (bug#44221).
* lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Rework based
	on the fact that the subr can now be redefined.
	* test/src/comp-tests.el (primitive-redefine-compile-44221):
	New testcase.
2020-10-26 16:34:20 +00:00
Andrea Corallo
5edc7aa019 Fix defsubst effectiveness (bug#44209)
* lisp/emacs-lisp/byte-run.el (defsubst): Fix macro definition.
	* test/src/comp-tests.el (comp-test-defsubst): New testcase.
	* test/src/comp-test-funcs.el (comp-test-defsubst-f): New
	function.
2020-10-25 22:56:50 +00:00
Philipp Stephani
e73e7a8bd6 Revert commit 1f44a77672 for XRef.
XRef supports Emacs versions back to Emacs 26.3, so it can’t use newer
functions such as ‘ert-resource-directory’.

* test/lisp/progmodes/xref-tests.el (xref-tests-data-dir): Don’t use
‘ert-resource-directory’
2020-10-25 11:24:11 +01:00
Philipp Stephani
2e090da775 Revert commit 1f44a77672 for Flymake.
Flymake supports all Emacs versions back to 26.1, so it can’t use
‘ert-resource-file’.

* test/lisp/progmodes/flymake-tests.el (flymake-tests-data-directory):
Recreate.
(flymake-tests--call-with-fixture): Stop using ‘ert-resource-file’.
2020-10-25 10:59:11 +01:00
Stefan Kangas
dd16e46bb9 ; Prefer https to http in more URLs
These were all tested and confirmed working.
2020-10-24 20:23:27 +02:00
Michael Albinus
95553309ef Accept nil COMMAND in tramp-sh-handle-make-process (Bug#44151)
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Accept nil
COMMAND.  (Bug#44151)

* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process):
Extend test.
2020-10-24 14:36:34 +02:00
Stefan Kangas
9f1dd2a7d5 Use lexical-binding in copyright.el and add tests
* lisp/emacs-lisp/copyright.el: Use lexical-binding.  Remove
redundant :group args.
* test/lisp/emacs-lisp/copyright-tests.el: New file.
2020-10-24 13:35:49 +02:00
Stefan Kangas
ff1068936f * test/manual/image-transforms-tests.el: Use lexical-binding. 2020-10-24 13:35:49 +02:00
Stefan Kangas
228d9d615d Move faces.el test data to follow our conventions
* test/lisp/faces-tests.el (ert-x): Require.
(faces--test-data-dir): Remove variable.
(faces--test-extend-with-themes): Use ert-resource-directory.
* test/lisp/faces-resources/*: Moved from test/data/themes/*.
2020-10-24 13:35:49 +02:00
Michael Albinus
8b1ccf5e7b Fix tramp-sh-handle-make-process; don't merge with master
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Accept nil
COMMAND.  (Bug#44151)

* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process):
Extend test.
2020-10-24 13:08:31 +02:00
Stefan Kangas
3af9e84ff5 Fix a broken unsafep test
* test/lisp/emacs-lisp/unsafep-tests.el
(test-unsafep/message): Fix test case.

(unsafep-tests--safe): Rename from testcover-unsafep-safe.
(unsafep-tests--unsafe): Rename from testcover-unsafep-unsafe.
(test-unsafep/safe, test-unsafep/unsafe): Doc fix.  Adjust usage
of above renamed variables.
2020-10-24 03:20:48 +02:00
Stefan Kangas
8461cfc8fc Move epg.el test data to follow our conventions
* test/lisp/epg-tests.el (ert-x): Require.
(epg-tests-data-directory): Remove variable.
(with-epg-tests): Use ert-resource-file.
* test/lisp/epg-resources/*: Moved from test/data/epg/.
2020-10-24 02:36:55 +02:00
Stefan Kangas
e402887d5d Move shr.el test data to follow our conventions
* test/lisp/net/shr-tests.el (ert, ert-x): Require.
(shr-tests--datadir): Remove variable.
(shr-test, rendering): Use ert-resource-directory.
* test/lisp/net/shr-resources/*: Move from test/data/shr/.
2020-10-24 02:29:04 +02:00
Stefan Kangas
ab7dddea90 Move mml-sec.el test data to follow our conventions
* test/lisp/gnus/mml-sec-tests.el (ert-x): Require.
(mml-secure-test-fixture, mml-sec-test--kill-gpg-agent):
Use ert-resource-directory.
* test/lisp/gnus/mml-sec-resources/*: Moved from test/data/mml-sec/.
* .gitignore: Update location of moved file "random_seed".
2020-10-24 02:21:07 +02:00
Andrea Corallo
99e7cc0da6 Merge remote-tracking branch 'savannah/master' into HEAD 2020-10-23 20:08:58 +01:00
Stefan Kangas
72c9d4bee1 Move more test data to follow our conventions
* test/data/minibuffer-test-cttq$tion: Move from here...
* test/lisp/minibuffer-resources/data/minibuffer-test-cttq$tion:
...to here.
* test/lisp/minibuffer-resources/lisp/cedet/semantic-utest-c.test:
* test/lisp/minibuffer-resources/lisp/cedet/semantic-utest.test:
New files.
* test/lisp/minibuffer-tests.el (ert, ert-x): Require.
(completion-table-test-quoting): Use ert-resource-directory.

* test/data/net/cert.pem:
* test/data/net/key.pem: Move frome here...
* test/lisp/net/network-stream-resources/cert.pem:
* test/lisp/net/network-stream-resources/key.pem: ...to here.
* test/lisp/net/network-stream-tests.el (ert, ert-x): Require.
(network-stream-tests--datadir): Remove variable.
(make-tls-server): Use ert-resource-file.

* test/data/vc/diff-mode/hello_emacs.c:
* test/data/vc/diff-mode/hello_emacs_1.c:
* test/data/vc/diff-mode/hello_world.c:
* test/data/vc/diff-mode/hello_world_1.c: Move from here...
* test/lisp/vc/diff-mode-resources/hello_emacs.c:
* test/lisp/vc/diff-mode-resources/hello_emacs_1.c:
* test/lisp/vc/diff-mode-resources/hello_world.c:
* test/lisp/vc/diff-mode-resources/hello_world_1.c: ...to here.
* test/lisp/vc/diff-mode-tests.el (ert, ert-x): Require.
(diff-mode-tests--datadir): Remove variable.
(diff-mode-test-font-lock-syntax-one-line)
(diff-mode-test-font-lock): Use ert-resource-directory.

* test/data/xdg/l10n.desktop:
* test/data/xdg/malformed.desktop:
* test/data/xdg/mimeapps.list:
* test/data/xdg/mimeinfo.cache:
* test/data/xdg/test.desktop: Move from here...
* test/lisp/xdg-resources/l10n.desktop:
* test/lisp/xdg-resources/malformed.desktop:
* test/lisp/xdg-resources/mimeapps.list:
* test/lisp/xdg-resources/mimeinfo.cache:
* test/lisp/xdg-resources/test.desktop: ...to here.
* test/lisp/xdg-tests.el (ert-x): Require.
(xdg-tests-data-dir): Remove variable.
(xdg-desktop-parsing, xdg-mime-associations): Use ert-resource-file.
2020-10-23 21:07:26 +02:00
Stefan Kangas
49bc8586b7 Move some test data to follow our conventions
* test/data/emacs-module/mod-test.c: Move from here...
* test/src/emacs-module-resources/mod-test.c: ...to here.
* test/src/emacs-module-tests.el (ert-x): Require.
(mod-test-file, module/describe-function-1):
* test/Makefile.in (test_module_dir): Adjust for move.

* test/data/files-bug18141.el.gz: Move from here...
* test/lisp/files-resources/files-bug18141.el.gz: ... to here.
* test/lisp/files-tests.el (ert-x): Require.
(files-test-bug-18141-file): Use ert-resource-file.

* test/data/mailcap/mime.types: Move from here...
* test/lisp/net/mailcap-resources/mime.types: ...to here.
* test/lisp/net/mailcap-tests.el (ert-x): Require.
(mailcap-tests-path): Use ert-resource-file.

* test/data/somelib.el:
* test/data/somelib2.el: Move from here...
* test/src/lread-resources/somelib.el:
* test/src/lread-resources/somelib2.el: ...to here.
* test/src/lread-tests.el (ert, ert-x): Require.
(lread-test-bug26837): Use ert-resource-directory.

* test/data/syntax-comments.txt: Move from here....
* test/src/syntax-resources/syntax-comments.txt: ...to here.
* test/src/syntax-tests.el (ert-x): Require.
(syntax-comments, syntax-br-comments, syntax-pps-comments):
Use ert-resource-file.

* test/data/xref/file1.txt:
* test/data/xref/file2.txt: Move from here...
* test/lisp/progmodes/xref-resources/file1.txt:
* test/lisp/progmodes/xref-resources/file2.txt: ...to here.
* test/lisp/progmodes/xref-tests.el (ert, ert-x): Require.
(xref-tests-data-dir): Use ert-resource-directory.
2020-10-23 16:29:46 +02:00
Ulf Jasper
9e4f11a163 Move icalendar test data to test/lisp/calendar/icalendar-resources
* test/lisp/calendar/icalendar-tests.el (ert-x): Required for
'ert-resource-file'.
(icalendar-tests--data-dir): Removed.
(icalendar-tests--get-file-contents): Use 'ert-resource-file' for
finding test data files.
* test/data/icalendar/*: Moved to test/lisp/calendar/icalendar-resources/.
* test/lisp/calendar/icalendar-resources/*: Moved from test/data/icalendar.
2020-10-23 14:48:49 +02:00
Stefan Kangas
22e5239c17 Clean up temporary files after package tests
* test/lisp/emacs-lisp/package-tests.el (with-package-test): Remove
temporary files after test.  (Bug#43359)
2020-10-23 12:58:01 +02:00
Stefan Kangas
558065531b Merge branch 'scratch/substitute-command-keys' 2020-10-23 00:33:23 +02:00
Stefan Kangas
8c7a55531b Remove incorrect use of decode-coding-string
* test/lisp/emacs-lisp/bindat-tests.el
(bindat-test-pack/multibyte-string-fails)
(bindat-test-unpack/multibyte-string-fails): Don't use
decode-coding-string.
Problem pointed out by Stefan Monnier <monnier@iro.umontreal.ca>.
2020-10-22 20:34:15 +02:00
Stefan Kangas
f6d1389796 Add missed file needed by time-tests.el
* test/lisp/time-resources/non-empty: New file.  This file is needed
by time-tests.el but was missed when it was committed.
2020-10-22 18:51:00 +02:00
Stefan Kangas
754a2f11b8 Add tests for perl-mode.el
* test/lisp/progmodes/perl-mode-tests.el: New file.
2020-10-22 18:23:49 +02:00
Ulf Jasper
e9d0f36248 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into master 2020-10-22 17:47:29 +02:00
Ulf Jasper
6342264ef7 Move test data for icalendar tests to separate files.
* test/lisp/calendar/icalendar-tests.el
(icalendar-tests--data-dir, icalendar-tests--get-file-contents):
New.
(icalendar-tests--test-import, icalendar-tests--do-test-import):
Read input and expected results from files.
(icalendar-import-non-recurring, icalendar-import-rrule)
(icalendar-import-duration, icalendar-import-bug-6766)
(icalendar-import-bug-24199, icalendar-import-bug-33277)
(icalendar-import-multiple-vcalendars, icalendar-import-with-uid)
(icalendar-import-with-timezone, icalendar-real-world): Move test
data (input and expected result) to separate files.

* test/calendar/icalendar/*
New files containing test data for icalendar tests.
2020-10-22 17:45:59 +02:00
Stefan Kangas
997ebf91dd Use lexical-binding in time-date.el and expand tests
* lisp/calendar/time-date.el: Use lexical-binding.
* test/lisp/calendar/time-date-tests.el
(test-obsolete-with-decoded-time-value)
(test-obsolete-encode-time-value, test-format-seconds)
(test-days-to-time, test-seconds-to-string): New tests.
(test-days-in-month, test-time-since, test-time-decoded-period):
Expand test with a few more values.
2020-10-22 17:33:29 +02:00
Stefan Kangas
0d7d09b0ef Test for error with multibyte strings in bindat.el
* test/lisp/emacs-lisp/bindat-tests.el
(bindat-test-pack/multibyte-string-fails)
(bindat-test-unpack/multibyte-string-fails): New tests.
2020-10-22 14:55:57 +02:00
Mauro Aranda
c009a0a6f7 Allow moving members of editable-list widget, via delete+insert
* etc/NEWS (Widget): Announce the feature (bug#6419).
* lisp/wid-edit.el (widget-editable-list-delete-at): Save into a new
widget property, :last-deleted, the WIDGET to be deleted.  Add
docstring.
(widget-editable-list-insert-before): If there is a recently deleted
child for the editable list, insert that one, instead of a new default
widget.  Add docstring.
(insert-button widget): Make :help-echo a function to avoid the
help-echo string become too long.
(delete-button widget): Tweak the :help-echo string, to document this
behavior.

* test/lisp/wid-edit-tests.el (widget-test-moving-editable-list-item):
Test the feature.
2020-10-22 13:52:42 +02:00
Stefan Kangas
ffbea0d705 Tweak two time.el tests
* test/lisp/time-tests.el (time-tests-display-time-update--load)
(time-tests-display-time-update): Tweak tests.
2020-10-21 17:22:17 +02:00
Stefan Kangas
b69f363698 Add tests for time.el
* lisp/time.el (display-time-update--load)
(display-time-update--mail): Extract from...
(display-time-update): ...here.
* test/lisp/time-tests.el: New file.
2020-10-21 16:59:50 +02:00
Stefan Kangas
e656600c96 * test/lisp/vc/vc-bzr-tests.el: Use lexical-binding. 2020-10-21 13:26:57 +02:00
Stefan Kangas
95a458724d Use lexical-binding in files-x-tests.el
* test/lisp/files-x-tests.el: Use lexical-binding.
(remote-null-device): Declare.
2020-10-21 13:25:39 +02:00
Stefan Kangas
0aa881f231 Use lexical-binding in hfy-cmap.el and add tests
* lisp/hfy-cmap.el: Use lexical-binding.
(hfy-cmap--parse-buffer): Extract from...
(htmlfontify-load-rgb-file): ...here.

* test/lisp/hfy-cmap-resources/rgb.txt:
* test/lisp/hfy-cmap-tests.el: New files.
2020-10-21 13:06:38 +02:00
Andrea Corallo
3be93390fb Sanitize eln filename when native compiling single functions
* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Fix
	temporary eln name generation.

	* test/src/comp-tests.el (free-fun-silly-name): New testcase.
2020-10-20 21:29:05 +01:00
Stefan Kangas
4a575eb18c byte-compile-file: Make optional LOAD argument obsolete
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Declare optional
LOAD argument obsolete.  Adjust callers.  (Bug#38072)
(byte-recompile-file): Declare optional LOAD argument obsolete.
* doc/lispref/compile.texi (Compilation Functions): Update
documentation to reflect above obsoletion.
* etc/NEWS: Announce above obsoletion.
2020-10-20 18:48:27 +02:00
Stefan Kangas
6a946d29a1 Tweak test data for signed package installation
* test/lisp/emacs-lisp/package-resources/signed/signed-bad-1.0.el:
* test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el:
Use lexical-binding.
* test/lisp/emacs-lisp/package-resources/signed/update-signatures.sh:
New file.
* test/lisp/emacs-lisp/package-resources/key.pub:
* test/lisp/emacs-lisp/package-resources/key.sec: Add new key.
* test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el.sig:
* test/lisp/emacs-lisp/package-resources/signed/archive-contents.sig:
Update signatures using new key.
2020-10-20 18:26:38 +02:00
Stefan Kangas
196d6c851c Make a bookmark test more robust
* test/lisp/bookmark-tests.el (bookmark-tests-insert-annotation):
Make test more robust by not being timing dependent.
2020-10-20 03:21:31 +02:00
Stefan Kangas
fe16248b77 Make auto-revert-mode tests run faster
* test/lisp/autorevert-tests.el (auto-revert--timeout): Make into
defun and shorten timeout by a factor 10.
(auto-revert--wait-for-revert): Cut timeouts in half.
(with-auto-revert-test): New macro to set timeout to 0.1.
(auto-revert-tests--write-file): New defun.
(auto-revert-test00-auto-revert-mode)
(auto-revert-test01-auto-revert-several-files)
(auto-revert-test02-auto-revert-deleted-file)
(auto-revert-test03-auto-revert-tail-mode)
(auto-revert-test04-auto-revert-mode-dired)
(auto-revert-test05-global-notify)
(auto-revert-test06-write-file): Adapt test to run faster.  Remove
:expensive-test marks.

This was discussed in:
https://lists.gnu.org/r/emacs-devel/2020-10/msg01233.html
2020-10-19 17:25:34 +02:00
Mattias Engdegård
653eab4788 Keep track of matching rules in compilation-mode
When matching messages in compilation-mode, keep track of the rule
employed for each match.  This facilitates debugging and allows us to
verify that each test case really exercises the rule that we expect it
to.

Naturally this uncovered several test cases that didn't check what the
author thought they did; the rules affixed to
compile-tests--test-regexps-data are those actually used, so that the
tests still pass.

* lisp/progmodes/compile.el (compilation--message): Add 'rule' slot.
(compilation-directory-properties, compilation-error-properties)
(compilation-internal-error-properties, compilation-parse-errors)
(compilation--compat-parse-errors): Set the rule slot.
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data)
(compile-tests--grep-regexp-testcases)
(compile-tests--grep-regexp-tricky-testcases): Add rules to test cases.
(compile--test-error-line): Check that the rule matches what we expect.
(compile-test-grep-regexps): Adapt to test case format.
Remove now superfluous ert-info.
2020-10-19 13:00:14 +02:00
dickmao
8cdbd84ebe `ffap-gopher-at-point' interminable without newlines
* lisp/ffap.el (ffap-gopher-at-point): Stop when we get to the end
of the buffer.
* test/lisp/ffap-tests.el (ffap-test-no-newlines): Ensure
termination for corner case (bug#44048).
2020-10-19 11:56:49 +02:00
Harald Jörg
fb26dc130d cperl-mode: Delete a misleading comment, add tests for verification
* lisp/progmodes/cperl-mode.el: Delete a comment which explains a
bug which has been fixed a long time ago (bug#44073).
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-mode-fontify-punct-vars): Add regression tests to verify
that fontification of punctuation variables doesn't start strings.
2020-10-19 10:57:57 +02:00
Stefan Kangas
ef5a604f08 Remove C version of substitute-command-keys
* src/doc.c (Fsubstitute_command_keys_old): Remove.
(syms_of_doc): Remove defsubr for Fsubstitute_command_keys_old.
* src/keymap.c (describe_map, describe_map_tree)
(describe_map_compare, describe_map_elt): Remove.
* src/keymap.h: Remove 'describe_map_tree'.
* test/lisp/help-tests.el (with-substitute-command-keys-test)
(help-tests-substitute-command-keys/compare)
(help-tests-substitute-command-keys/compare-all):
Don't test the C version of 'substitute-command-keys' removed
above.
2020-10-18 17:25:23 +02:00
Stefan Kangas
647b1c5142 Translate describe_map to Lisp
Third step in converting substitute-command-keys to Lisp.

* lisp/help.el (describe-map): New Lisp version of describe_map.
(help--describe-map-compare, help--describe-translation)
(help--describe-command, help--shadow-lookup): New helper
functions for describe-map.
(help--keymaps-seen, help--previous-description-column): New
variables.
* src/keymap.c
(Fkeymap__get_keyelt): New defun to expose get_keyelt to Lisp.
(Fdescribe_map_tree_old, Fdescribe_map): Remove defuns.
(Fdescribe_vector_internal): New defun to expose describe_vector to
Lisp in a way usable by describe-map.
(syms_of_keymap): New defsubrs for Fkeymap__get_keyelt and
Fdescribe_vector_internal.  Remove defsubrs for Fdescribe_map_tree_old
and Fdescribe_map.  Remove 'help--keymaps-seen'.

* test/lisp/help-tests.el
(help-tests-substitute-command-keys/shadow): Extend test.
(help-tests-substitute-command-keys/test-mode)
(help-tests-substitute-command-keys/compare-all)
(help-tests-describe-map-tree/no-menu-t)
(help-tests-describe-map-tree/no-menu-nil)
(help-tests-describe-map-tree/mention-shadow-t)
(help-tests-describe-map-tree/mention-shadow-nil)
(help-tests-describe-map-tree/partial-t)
(help-tests-describe-map-tree/partial-nil): New tests.
2020-10-18 17:25:19 +02:00
Stefan Kangas
dcf9cd47ae Add new Lisp implementation of substitute-command-keys
This is only the first step towards a full Lisp implementation, and
does not remove the old C code.  On the contrary, it is partly based
on using the old C code, which is to be replaced in steps.  This also
makes it easy to test that it produces the same output as the old.

* src/doc.c (Fsubstitute_command_keys_old): Rename from
Fsubstitute_command_keys.
(Fget_quoting_style): New defun to expose text_quoting_style to Lisp.
(syms_of_doc): Expose above symbols.
* lisp/help.el (substitute-command-keys): New Lisp version of
substitute-command-keys.  (Bug#8951)

* src/keymap.c
(Fdescribe_map_tree): New defun to expose describe_map_tree to Lisp.
(syms_of_keymap): New defsubr for Fdescribe_map_tree.

* src/keyboard.c (help_echo_substitute_command_keys):
* src/doc.c (Fdocumentation, Fdocumentation_property):
* src/print.c (print_error_message):
* src/syntax.c (Finternal_describe_syntax_value): Fix calls to use new
Lisp implementation of substitute-command-keys.

* test/src/doc-tests.el: Remove file.
* test/lisp/help-tests.el: Add tests for substitute-command-keys
copied from above file.
2020-10-18 17:23:24 +02:00
Mattias Engdegård
9bc5c016a1 Strengthen js-mode indentation tests
Test not only that the indentation engine is idempotent but that it
will indent a file to the expected shape from scratch.

* test/lisp/progmodes/js-tests.el (js-tests--remove-indentation): New.
(js-deftest-indent): Extend test.
2020-10-18 15:54:02 +02:00
Stefan Kangas
335e3cf89f Convert manual js indent tests to unit tests
* test/lisp/progmodes/js-tests.el (ert-x): Require.
(js-deftest-indent): New macro.  Use it to define tests for indenting
the below files.

* test/manual/indent/js-chain.js:
* test/manual/indent/js-indent-align-list-continuation-nil.js:
* test/manual/indent/js-indent-init-dynamic.js:
* test/manual/indent/js-indent-init-t.js:
* test/manual/indent/js.js:
* test/manual/indent/jsx-align-gt-with-lt.jsx:
* test/manual/indent/jsx-comment-string.jsx:
* test/manual/indent/jsx-indent-level.jsx:
* test/manual/indent/jsx-quote.jsx:
* test/manual/indent/jsx-self-closing.jsx:
* test/manual/indent/jsx-unclosed-1.jsx:
* test/manual/indent/jsx-unclosed-2.jsx:
* test/manual/indent/jsx.jsx: Move from here...
* test/lisp/progmodes/js-resources/js-chain.js:
* test/lisp/progmodes/js-resources/js-indent-align-list-continuation-nil.js:
* test/lisp/progmodes/js-resources/js-indent-init-dynamic.js:
* test/lisp/progmodes/js-resources/js-indent-init-t.js:
* test/lisp/progmodes/js-resources/js.js:
* test/lisp/progmodes/js-resources/jsx-align-gt-with-lt.jsx:
* test/lisp/progmodes/js-resources/jsx-comment-string.jsx:
* test/lisp/progmodes/js-resources/jsx-indent-level.jsx:
* test/lisp/progmodes/js-resources/jsx-quote.jsx:
* test/lisp/progmodes/js-resources/jsx-self-closing.jsx:
* test/lisp/progmodes/js-resources/jsx-unclosed-1.jsx:
* test/lisp/progmodes/js-resources/jsx-unclosed-2.jsx:
* test/lisp/progmodes/js-resources/jsx.jsx: ...to here.
2020-10-18 02:28:22 +02:00
Stefan Kangas
61e51fee9c Base bookmark-bmenu-mode on tabulated-list-mode (Bug#39293)
Rewriting bookmark-bmenu-mode to be based on 'tabulated-list-mode'
allows us to greatly simplify the code in several cases.  In addition,
we get some features for free, such as sorting by column.

The only functional step backwards is that we no longer support the
optional "inline" header line, a bookmark.el-specific feature to have
a header without using 'header-line-format'.  This feature is believed
to be not very useful or widely used.

* lisp/bookmark.el (tabulated-list): Require.
(bookmark-bmenu-mode): Inherit from 'tabulated-list-mode' instead of
'special-mode' and make the necessary changes to support that.
(bookmark-bmenu-mode-map): Inherit from 'tabulated-list-mode-map'
instead of 'special-mode-map'.  Remove now duplicate key bindings.
(bookmark-bmenu--revert): New function to show the bookmark list using
'tabulated-list-mode'.
(bookmark-bmenu-list): Simplify by using above new function.
(bookmark-bmenu-bookmark): Adapt to 'tabulated-list-mode'.
(bookmark-bmenu--name-predicate)
(bookmark-bmenu--file-predicate): New functions used by
'tabulated-list-mode' to sort.

(bookmark-bmenu-set-header): Redefine as obsolete function alias for
'tabulated-list-init-header'.
(bookmark-bmenu-toggle-filenames, bookmark-bmenu-show-filenames)
(bookmark-bmenu-hide-filenames, bookmark-bmenu-mark)
(bookmark-bmenu-mark-all, bookmark-bmenu-unmark-all)
(bookmark-bmenu-delete-all, bookmark-bmenu-unmark)
(bookmark-bmenu-delete, bookmark-bmenu-delete-backwards): Simplify now
that we can depend on 'tabulated-list-mode' to do more work.

(bookmark-bmenu-use-header-line)
(bookmark-bmenu-inline-header-height): Declare variables relating to
the now unsupported "inline" header obsolete.
(bookmark-bmenu-ensure-position)
(bookmark-bmenu-execute-deletions): Remove code to handle "inline" header.

* test/lisp/bookmark-tests.el
(bookmark-test-bmenu-edit-annotation/show-annotation)
(bookmark-test-bmenu-unmark, bookmark-test-bmenu-mark): Update tests
for minor changes when using 'tabulated-list-mode'.
2020-10-17 17:56:44 +02:00
Stefan Kangas
39a001451f * test/lisp/mail/rfc822-tests.el: New file. 2020-10-17 15:55:42 +02:00
Andrea Corallo
d5791ba5fe Merge remote-tracking branch 'savannah/master' into HEAD 2020-10-17 08:00:34 +02:00
Michael Albinus
6a2f56db4e Make last change in tramp-archive-tests.el backward compatible
* test/lisp/net/tramp-archive-tests.el (ert-resource-directory-format)
(ert-resource-directory-trim-left-regexp)
(ert-resource-directory-trim-right-regexp, ert-resource-directory)
(ert-resource-file): Define if they don't exist.
2020-10-16 16:51:25 +02:00
Eli Zaretskii
0b0297ad60 Fix file-name problems in several tests
* test/lisp/saveplace-tests.el
(saveplace-test-forget-unreadable-files):  Use file-truename, to
avoid false negatives when file names are not 'equal' as strings,
but point to the same file.
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-with-normal-env)
(edebug-tests-run-macro):
* test/lisp/emacs-lisp/testcover-tests.el
(testcover-tests-markup-region, testcover-tests-run-test-case):
Bind find-file-suppress-same-file-warnings to  a non-nil value, to
avoid warnings about "same-file-names", at least on MS-Windows,
due to 8+3 aliases.
2020-10-16 16:49:47 +03:00
Stefan Kangas
1f44a77672 Use new resource directory macros in tests (Bug#43792)
* test/lisp/bookmark-tests.el (bookmark-tests-data-dir):
* test/lisp/calendar/todo-mode-tests.el (todo-test-data-dir):
* test/lisp/net/dbus-tests.el (dbus--tests-dir):
* test/lisp/emacs-lisp/edebug-tests.el
(edebug-tests-sample-code-file):
* test/lisp/emacs-lisp/package-tests.el
(package-test-fake-contents-file):
* test/lisp/emacs-lisp/shadow-tests.el (shadow-tests-data-directory):
* test/lisp/emacs-lisp/testcover-tests.el
(testcover-tests-file-dir, testcover-tests-test-cases):
* test/lisp/mail/uudecode-tests.el (uudecode-tests-data-dir):
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test-resource-directory):
* test/lisp/pcmpl-linux-tests.el (pcmpl-linux-tests-data-dir):
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-mode-tests-data-directory):
* test/lisp/progmodes/flymake-tests.el
(flymake-tests-data-directory):
* test/lisp/progmodes/ruby-mode-tests.el (ruby-mode-tests-data-dir):
* test/lisp/saveplace-tests.el (saveplace-tests-dir):
* test/lisp/textmodes/css-mode-tests.el (css-mode-tests-data-dir):
Remove.

* test/lisp/bookmark-tests.el (bookmark-tests-bookmark-file)
(bookmark-tests-example-file, bookmark-tests-bookmark-file-list):
* test/lisp/calendar/todo-mode-tests.el (todo-test-file-1)
(todo-test-archive-1, with-todo-test, todo-test--add-file):
* test/lisp/custom-tests.el (custom--test-theme-variables):
* test/lisp/net/dbus-tests.el (dbus--test-introspect):
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-setup-code-file):
* test/lisp/emacs-lisp/package-tests.el (package-test-data-dir)
(package-test-desc-from-buffer, package-test-install-single)
(package-test-macro-compilation)
(package-test-install-prioritized)
(package-test-install-multifile, package-test-update-archives)
(package-test-update-archives-async)
(package-test-update-archives/ignore-nil-entry)
(package-test-signed, package-x-test-upload-buffer)
(package-x-test-upload-new-version):
* test/lisp/emacs-lisp/shadow-tests.el (shadow-case-insensitive):
* test/lisp/emacs-lisp/testcover-tests.el
(testcover-tests-build-test-cases):
* test/lisp/mail/uudecode-tests.el (uudecode-tests-encoded-str)
(uudecode-tests-decoded-str):
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test-file-archive)
(tramp-archive-test-directory):
* test/lisp/pcmpl-linux-tests.el (pcmpl-linux-test-fs-types)
(pcmpl-linux-test-mounted-directories):
* test/lisp/progmodes/cperl-mode-tests.el (cperl-mode-test-bug-10483)
(cperl-mode-test-indent-styles):
* test/lisp/progmodes/flymake-tests.el
(flymake-tests--call-with-fixture):
* test/lisp/progmodes/ruby-mode-tests.el
(ruby--indent/converted-from-manual-test):
* test/lisp/saveplace-tests.el
(saveplace-test-save-place-to-alist/dir)
(saveplace-test-load-alist-from-file):
* test/lisp/textmodes/css-mode-tests.el (css-mode-test-indent): Adjust
to use new resource directory macros.
2020-10-16 11:28:09 +02:00
Stephen Berman
7543d5f173 Adjust some tests so that they work in symlinked environs
* test/lisp/help-fns-tests.el (help-fns-test-lisp-macro)
(help-fns-test-lisp-defsubst):
* test/lisp/emacs-lisp/cl-generic-tests.el
(cl-generic-tests--method-files--finds-methods): Adjust test so
that they work in a symlinked environment (bug#43004).
(cl-generic-tests--method-files--finds-methods): Use file-truename
so that this works in a symlinked environment (bug#43004).
2020-10-16 10:33:19 +02:00
Basil L. Contovounesios
a950a6e6cf Substitute command keys in button help-echo values
* lisp/button.el (button--help-echo): Pass resulting string through
substitute-command-keys for consistency with show-help-function.
* test/lisp/button-tests.el (button-tests--map): New test keymap.
(button--help-echo-string, button--help-echo-form)
(button--help-echo-function): Use it to test command key
substitution in help-echo strings (bug#43070).
2020-10-16 09:32:48 +02:00
Lars Ingebrigtsen
a38002cecd Make Gnus more liberal when interpreting Face headers again
* lisp/gnus/gnus-fun.el (gnus-convert-face-to-png): Do it.

* lisp/gnus/gnus-util.el (gnus-base64-repad): Allow not checking
anything, but just repadding.
2020-10-15 08:39:00 +02:00
Andrea Corallo
f8505fd3d4 Merge remote-tracking branch 'savannah/master' into HEAD 2020-10-14 11:04:55 +02:00
Andrea Corallo
e9c150b5c2 * Add a test to verify form native compilation.
* test/src/comp-tests.el (comp-deftest): Fix typo.
	(compile-forms): New test.
2020-10-14 11:04:36 +02:00
Andrea Corallo
4f0e879030 Rework `native-compile' interface so it can return compiled functions
* lisp/emacs-lisp/comp.el (native-compile): Return the compiled
	function when the input is a symbol or a form.
	* test/src/comp-tests.el (free-fun, tco, fw-prop): Update tests
	for new `native-compile' interface.
2020-10-14 11:04:36 +02:00
Mattias Engdegård
cf40795888 Calc: allow infinite binary word size (bug#43764)
Setting the word size ("b w") to 0 removes the word size clipping for
all bit operations (effectively as if a word size of -∞ had been set).
Rotation is disallowed; logical and arithmetic shifts behave
identically.

After a suggestion by Vincent Belaïche.

* lisp/calc/calc-bin.el (calc-word-size, math-binary-arg)
(math-binary-modulo-args, calcFunc-lsh, calcFunc-ash, calcFunc-rot)
(math-clip, math-format-twos-complement): Allow a word size of 0,
meaning -∞.
* test/lisp/calc/calc-tests.el
(calc-tests--not, calc-tests--and, calc-tests--or, calc-tests--xor)
(calc-tests--diff): New functions.
(calc-tests--clip, calc-tests--rot, calc-shift-binary): Extend to
cover word size 0.
(calc-bit-ops): New test.
* doc/misc/calc.texi (Binary Functions): Update manual.
* etc/NEWS: Announce the change.
2020-10-13 11:29:01 +02:00
Mattias Engdegård
add1314195 Calc: revert to old precedence of '/' in (La)TeX input mode
Make the '/' precedence higher than that of '+' and '-' again,
partially reverting fda9b316f8 (bug#43902).

* lisp/calc/calc-lang.el (tex): Change precedence of '/'.
* test/lisp/calc/calc-tests.el (calc-latex-input): New test.
2020-10-13 11:29:01 +02:00
Mattias Engdegård
721b8468d2 Calc: make tests less chatty
* test/lisp/calc/calc-tests.el (calc-extract-units, calc-convert-units)
(calc-matrix-determinant, calc-choose): Remove "Working..." messages.
(calc-tests--check-choose, calc-tests--explain-choose): Eliminate.
2020-10-13 11:17:35 +02:00
Lars Ingebrigtsen
12175a339e Allow creating unibyte strings from Emacs modules
* doc/lispref/internals.texi (Module Values): Document
make_unibyte_string (bug#34873).

* src/emacs-module.c (module_make_unibyte_string): New function.
(initialize_environment): Export it.

* src/module-env-25.h: Define it.

* test/data/emacs-module/mod-test.c (Fmod_test_return_unibyte):
Test it.

* test/src/emacs-module-tests.el (module/unibyte): Test it.
2020-10-13 06:51:06 +02:00
Michael Albinus
3ec6dcfab8 ; Fix dbus-tests.el formatting 2020-10-12 11:41:54 +02:00
Hugh Daschbach
2f92177f80 Add interface arg to D-Bus PropertiesChanged signal.
* lisp/net/dbus.el (dbus-register-property, dbus-property-handler):
Fix signal generation.  (Bug#43936)

* test/lisp/net/dbus-tests.el (dbus-test06-register-property-emits-signal):
Fix test.
2020-10-12 11:37:27 +02:00
Stefan Kangas
4bda84da2e Convert url-domsuf.el tests to ert
* lisp/url/url-domsuf.el: Move commented out tests from here...
* test/lisp/url/url-domsuf-tests.el: ...to this new file.
2020-10-11 15:56:21 +02:00
Glenn Morris
0ed0dac0ca Merge from origin/emacs-27
c00606171f (origin/emacs-27) A better fix for bug#43886
3196fd44c3 Avoid crashes when a theme is loaded with one frame suspended
0407b15500 Removed an incorrectly placed extra word in the semantic docs
040dcbe53e Fix current-line hscrolling when overlays change
c56eeba2ce Extend tests for shell-command-dont-erase-buffer
2020-10-10 07:50:20 -07:00
Mattias Engdegård
1006eb1198 Improve coverage of Calc bit shift test
* test/lisp/calc/calc-tests.el (calc-tests--rsh, calc-tests--rash)
(calc-shift-binary): Test with negative word sizes.
2020-10-10 11:29:43 +02:00
Andrea Corallo
f7e7ff4fb1 Merge remote-tracking branch 'savannah/master' into HEAD 2020-10-10 11:00:35 +02:00
Stefan Kangas
b19bf08447 ; shorten https://lists.gnu.org/archive/html/... links 2020-10-09 12:23:02 +02:00
Stefan Kangas
95e8c7d1d9 ; Fix typos 2020-10-09 11:53:21 +02:00
Mattias Engdegård
35478f3f76 Calc: fix arithmetic right shift sign bit detection
Arithmetic right shift didn't compute the bit to shift in correctly.
For example, #x600000000 right-shifted 8 steps (with 32 bit word size)
resulted in #xff000000 rather than 0. (Bug#43764)

* lisp/calc/calc-bin.el (calcFunc-ash): Fix condition.
* test/lisp/calc/calc-tests.el (calc-tests--clip, calc-tests--lsh)
(calc-tests--rsh, calc-tests--ash, calc-tests--rash, calc-tests--rot):
New.
(calc-shift-binary): New test.
2020-10-09 11:24:15 +02:00
Nick Gasson
c69c17d573 Match OpenBSD doas password prompt in comint
* lisp/comint.el (comint-password-prompt-regexp): match OpenBSD doas
password prompt. OpenBSD 5.8 replaced sudo with doas in the base
install.

* test/lisp/comint-tests.el (comint-testsuite-password-strings): test
that the doas password prompt is matched (bug#43846).

Copyright-paperwork-exempt: yes
2020-10-09 06:57:07 +02:00
Michael Albinus
c56eeba2ce Extend tests for shell-command-dont-erase-buffer
* test/lisp/simple-tests.el
(simple-tests-shell-command-dont-erase-buffer): Extend test.

* test/lisp/net/tramp-tests.el
(tramp-test32-shell-command-dont-erase-buffer): Adapt test.  Tag
it :unstable.
2020-10-08 11:28:50 +02:00
Stefan Monnier
891248be1c * test/lisp/progmodes/ruby-mode-tests.el: Fix obsolete warnings 2020-10-06 22:08:19 -04:00
Mattias Engdegård
61113a3254 Suppress obsoletion warning in test of obsolete rx function
* test/lisp/emacs-lisp/rx-tests.el (rx-compat): Add byte-compilation
warning suppression.
2020-10-06 14:22:57 +02:00
Lars Ingebrigtsen
96f502496e Fix animate test that somehow changed recently 2020-10-06 03:51:17 +02:00
Lars Ingebrigtsen
9410c4e6b6 Fix mule-util-tests after recent truncation changes
* test/lisp/international/mule-util-tests.el: Fix truncation checks.
2020-10-06 03:48:00 +02:00
Harald Jörg
a14321ff69 cperl-mode: Fix a test to ensure cperl-mode is active
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-mode-test-indent-exp): Make sure that cperl-mode is active
for testing 'cperl-indent-exp', also skip this test under
perl-mode.

* test/lisp/progmodes/cperl-mode-resources/cperl-indent-exp.pl:
Eliminate dependency on unrelated customizable variables (bug#10483).
2020-10-06 03:39:55 +02:00
Andrea Corallo
29f7024b6c * Fix a test in test/lisp/subr-tests.el
* test/lisp/subr-tests.el (subr-tests-bug22027): Redefine
	`read-string' with a lambda with the same number of arguments.
2020-10-05 21:33:04 +02:00
Andrea Corallo
f43dbe65ce Add a test for primitive redefinition
* test/src/comp-tests.el (primitive-redefine): New test.
	* test/src/comp-test-funcs.el (comp-test-primitive-redefine-f):
	New function.
2020-10-05 21:32:38 +02:00
Andrea Corallo
b3ade4de17 Revert "Use advice-flet' in place of cl-letf' to avoid primitive...
This reverts commit 825e85b393.
2020-10-05 21:32:35 +02:00
Michael Albinus
0a5a1adab9 * src/dbusbind.c (xd_signature): Better type check for array elements.
* test/lisp/net/dbus-tests.el (dbus-test01-compound-types): Extend test.
2020-10-05 13:58:28 +02:00
Stefan Monnier
14a5db2912 * src/xdisp.c (syms_of_xdisp): New var redisplay_skip_initial_frame.
This makes it possible to run most of the redisplay code (tho not the
actual drawing since there's nowhere to draw) even when there's no
real frame at hand, as is the case in batch mode.
This makes `xdisp-tests--minibuffer-resizing` work even in batch.

(redisplay_internal): Obey it.
(init_xdisp): Set `echo_area_window` even in noninteractive mode.
* src/dispnew.c (update_frame): Skip the initial frame.
* src/frame.c (make_frame): Use 80x25 as the default initial size.

* test/src/xdisp-tests.el (xdisp-tests--minibuffer-resizing):
Use the new var and fix use of `executing-kbd-macro`.
2020-10-04 22:50:38 -04:00
Andrea Corallo
44ef24342f Merge remote-tracking branch 'savannah/master' into HEAD 2020-10-04 19:45:05 +02:00
Andrea Corallo
0373bb838a * Fix two tests in help-fns-tests.el for native code
* test/lisp/help-fns-tests.el (help-fns-test-lisp-defun)
	(help-fns-test-lisp-defsubst): Fix description string
	for native compiled functions.
2020-10-04 19:43:42 +02:00
Michael Albinus
96a8e84606 Make dbus-unregister-object work for monitors
* doc/misc/dbus.texi (Monitoring Messages): Rename from
"Monitoring Events".
(Register Objects, Monitoring Messages):
Mention returned object.

* lisp/net/dbus.el (dbus-unregister-object): Adapt docstring.
(dbus-unregister-object): Delete monitor if needed.
(dbus-register-monitor): Return proper object.

* src/dbusbind.c (dbus-registered-objects-table): Adapt docstring.

* test/lisp/net/dbus-tests.el (dbus--test-signal-handler):
Adapt docstring.
(dbus-test08-register-monitor): New test.
2020-10-04 18:56:45 +02:00
Stefan Kangas
d6a2754348 ; Fix more typos 2020-10-03 12:53:51 +02:00
Alan Mackenzie
d22fe0ec3a Enhance syntax-tests.el to test comments in parse-partial-sexp
This now tests the interface between parse-partial-sexp and the low level
comment function in syntax.c

* test/src/syntax-tests.el (syntax-comments-midpoint): New function.
(syntax-pps-comments): New macro.
(top level): Two new syntax-br-comments tests and five new syntax-pps-comments
tests.

* test/data/syntax-comments.txt (top level): Amend some test fragments and add
some more.
2020-10-02 21:21:06 +00:00
Mattias Engdegård
0ade20f49f Calc: fix formatting and parsing Unix time (bug#43759)
The number of days from epoch to Jan 1, 1970 that was used in parsing
and formatting Unix time was incorrect.  The previous fix
(in e368697ce3) was incomplete.

Reported by Vincent Belaïche.

* lisp/calc/calc-forms.el (math-unix-epoch): New constant.
(math-format-date-part, math-parse-standard-date, calcFunc-unixtime):
Use math-unix-epoch instead of a constant that is sometimes wrong.
* test/lisp/calc/calc-tests.el (calc-unix-date): New test.
2020-10-02 22:24:54 +02:00
Andrea Corallo
825e85b393 Use advice-flet' in place of cl-letf' to avoid primitive redefinition
* test/lisp/time-stamp-tests.el (with-time-stamp-system-name): Use
	`advice-flet' to advice primitive avoiding redefinition.

	* test/lisp/tempo-tests.el (tempo-p-element-test)
	(tempo-P-element-test, tempo-r-element-test)
	(tempo-s-element-test, tempo-r>-element-test): Likewise.

	* test/lisp/subr-tests.el (subr-tests-bug22027): Likewise.

	* test/lisp/shadowfile-tests.el (shadow-test00-clusters)
	(shadow-test01-sites, shadow-test06-literal-groups)
	(shadow-test07-regexp-groups): Likewise.

	* test/lisp/replace-tests.el (replace-tests-with-undo): Likewise.

	* test/lisp/play/dissociate-tests.el
	(dissociate-tests-dissociated-press): Likewise.

	* test/lisp/net/tramp-tests.el (tramp-test10-write-region)
	(tramp-test21-file-links): Likewise.

	* test/lisp/kmacro-tests.el (kmacro-tests-call-macro-hint-and-repeat)
	(kmacro-tests-repeat-on-last-key)
	(kmacro-tests-repeat-view-and-run)
	(kmacro-tests-bind-to-key-with-key-sequence-in-use): Likewise.

	* test/lisp/files-tests.el (files-tests-read-file-in-~): Likewise.

	* test/lisp/emacs-lisp/rmc-tests.el (test-read-multiple-choice):
	Likewise.

	* test/lisp/bookmark-tests.el (bookmark-test-bmenu-locate):
	Likewise.

	* test/lisp/abbrev-tests.el
	(inverse-add-abbrev-skips-trailing-nonword)
	(inverse-add-abbrev-skips-trailing-nonword/positive-arg)
	(inverse-add-abbrev-skips-trailing-nonword/negative-arg): Likewise.
2020-10-02 21:20:53 +02:00
Alan Mackenzie
6a64660318 Enhance syntax-tests.el to test comments in scan-lists
This now tests the interface between scan_lists and the comment functions.

* test/src/syntax-tests.el (syntax-br-comments): New macro.
({-in, ;-in, /*-in): Set parse-sexp-ignore-comments to t.
(top level): Add 15 tests for comments inside brace lists.

* test/data/syntax-comments.txt (top level): Amend some test fragments.
2020-10-02 17:25:02 +00:00
Glenn Morris
726eb835dd Merge from origin/emacs-27
78eacf31e8 ; Fix many typos in symbols in docs and comments
d5d12707d6 * doc/misc/flymake.texi (Using Flymake): Fix a typo.  (Bug...

# Conflicts:
#	lisp/allout.el
#	lisp/progmodes/ebrowse.el
2020-10-02 09:38:24 -07:00
Stefan Kangas
78eacf31e8 ; Fix many typos in symbols in docs and comments 2020-10-02 13:29:45 +02:00
Mattias Engdegård
4cb16b6f42 Calc: fix business days calculation (bug43677)
The calculation of business days was broken in 2012 (probably
310e60d945 or thereabouts) when the date representation changed
epoch so that Jan 1, 1 AD became day number 1 instead of 0.  Repair
this, along with an unrelated bug that prevented arbitrary holiday
weekdays from working.

Reported by Aaron Zeng.

* lisp/calc/calc-forms.el (math-to-business-day)
(math-from-business-day): Correct calculation of weekdays using Calc's
current (Rata Die) chronology.  Modify loop condition to cope with odd
sets of holiday weekdays.
* test/lisp/calc/calc-tests.el (calc-business-days): New test.
2020-10-02 10:35:52 +02:00
Andrea Corallo
f345622152 Clean-up testsuite for vanilla builds
Tag all native compiler tests and skip them in vanilla builds

	* test/Makefile.in (SELECTOR_DEFAULT, SELECTOR_EXPENSIVE)
	(SELECTOR_ALL): Define selectors for vanilla or nativecomp builds.
	* test/src/comp-tests.el: Do not native compile test files on
	vanilla.
	(comp-deftest): New macro to define tests tagging as :nativecomp.
2020-10-02 10:24:32 +02:00
Lars Ingebrigtsen
6f36b67e41 Stop using a dynamically bound 'generated-autoload-file' variable
* doc/lispref/loading.texi (Autoload): Document change of name
(bug#39823).

* lisp/emacs-lisp/autoload.el (autoload-find-generated-file): Pass
the file name in.
(autoload-generated-file): Ditto.
(autoload-file-load-name): Ditto.
(generate-file-autoloads): Ditto.
(autoload--setup-output): Ditto.
(autoload-generate-file-autoloads): Ditto, and alter doc string to
reflect when `generated-autoload-file' is heeded.
(update-file-autoloads): Pass outfile in to functions.
(autoload-find-destination): Ditto.
(update-directory-autoloads): Make into an obsolete shim around
`make-directory-autoloads'.
(make-directory-autoloads): Renamed from
`update-directory-autoloads' with new semantics.
(batch-update-autoloads): Adjust caller.

* lisp/emacs-lisp/package.el (package-generate-autoloads): Adjust
caller.
2020-10-02 04:34:31 +02:00