1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-20 18:17:20 +00:00
Commit Graph

3762 Commits

Author SHA1 Message Date
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
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
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
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
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
Tino Calancha
29435ecd8e Fix bug in wdired-get-filename
* lisp/wdired.el (wdired-get-filename): Acknowledge the first
argument (bug#39280).
* test/lisp/wdired-tests.el (wdired-test-bug39280): Add test.
2020-10-01 23:34:01 +02:00
Alan Mackenzie
da591df90a Enhance syntax-tests.el to test some comment character handling.
* test/src/syntax-tests: Add a new section testing some aspects of comment
  handling in syntax.c.  This needs further enhancement.  It uses ....

* test/data/syntax-comments.txt: A new test file.
2020-10-01 20:35:40 +00:00
Michael R. Mauger
e274e3f44b 2020-03-29 Michael R. Mauger <michael@mauger.com>
* lisp/progmodes/sql.el (sql-add-product): Re-correct argument
       spec.  Previous change was due to my mistake; I have
       resolved back to the prior behavior (Bug#39960).
       * test/lisp/progmodes/sql-tests.el (sql-test-add-product): Added
       test to insure I don't make the same mistake again.
2020-10-01 20:34:55 +02:00
Stefan Kangas
af72f6d510 Silence byte-compiler in two tests
* test/lisp/obsolete/cl-tests.el (require):
* test/lisp/simple-tests.el (simple-test-count-words-bug-41761):
Silence byte-compiler.
2020-10-01 15:34:46 +02:00
Lars Ingebrigtsen
648de09e71 Remove mml-sec-test that assumes the first signature
This is no longer supported; the user is asked for what signature to
use.
2020-10-01 05:19:49 +02:00
Alex Bochannek
d11627a7ca Make gnus-base64-repad a bit stricter again
* lisp/gnus/gnus-util.el (gnus-base64-repad): Make the code a bit
stricter again.
2020-10-01 02:44:58 +02:00
Robert Pluim
7518596857 Query for the signer when sending signed mail (with unknown signer)
* lisp/gnus/mml-sec.el (mml-secure-sender-sign-query): New
function (bug#40118).
(mml-secure-epg-sign): Use it to determine the signer (bug#40118).

* lisp/gnus/mml-sec.el
(mml-secure-allow-signing-with-unknown-recipient): Remove.
2020-10-01 02:14:17 +02:00
Eli Zaretskii
a190a446ee Fix 'move-to-column' when invisible text follows a TAB
* src/indent.c (scan_for_column): Accept 2 more arguments, and
report through them the position corresponding to PREVCOL.  All
callers changed.
(Fmove_to_column): Use the prev_col's position to test for a TAB
instead of assuming that the TAB is just before point (which is
false when there's invisible text around).  (Bug#43587)

* test/src/indent-tests.el: New file.
2020-09-30 17:33:58 +03:00
Michael Albinus
b7224f9629 Stricter checks for D-Bus compound types.
* src/dbusbind.c (XD_DBUS_TYPE_P, Fdbus__init_bus)
(xd_read_queued_messages): Use Fkeywordp instead of SYMBOLP.
(xd_signature): Stricter checks for compound types.

* test/lisp/net/dbus-tests.el (dbus-test01-compound-types): Extend test.
2020-09-30 15:28:53 +02:00
Michael Albinus
17ecfa8698 Minor code cleanup in dbus-tests.el
* test/lisp/net/dbus-tests.el (dbus--tests-dir): Make it a defconst.
(dbus--test-method-reentry-handler): Mark args as unused.
(dbus-test04-method-reentry): Tag it :expensive-test.  Fix typo.
(dbus-test06-property-types): Remove duplicate test.
(dbus--test-introspect): Use `insert-file-contents-literally'.
(dbus--test-validate-property): Mark expected-annotations as unused.
(dbus--test-validate-m-or-s): Remove superfluous le-clause.
2020-09-30 12:40:08 +02:00
Hugh Daschbach
d5f9a07862 Add D-Bus method-call reentrant test
* test/lisp/net/dbus-tests.el (dbus--tests-method-reentry-handler):
New defun.
(dbus-test04-method-reentry): New test.  (Bug#43251)
2020-09-30 11:27:22 +02:00
Hugh Daschbach
2018090987 * test/lisp/net/dbus-tests.el: Add timeout tests.
(dbus-test04-call-method-timeout, dbus-test07-introspection-timeout):
New tests.
2020-09-30 11:23:24 +02:00
Hugh Daschbach
0bc19c17fd Add D-Bus introspection tests
* lisp/net/dbus.el (dbus-annotation-deprecated): New defconst.

* test/lisp/net/dbus-tests.el  (dbus--tests-dir): New defvar.
(dbus--test-introspect, dbus--test-validate-interface)
(dbus--test-validate-annotations, dbus--test-validate-property)
(dbus--test-validate-m-or-s, dbus--test-validate-signal)
(dbus--test-validate-method): New defuns.
(dbus-test07-introspection): New test.

* test/lisp/net/dbus-resources/org.gnu.Emacs.TestDBus.xml:
New test data.
2020-09-30 11:19:41 +02:00
Hugh Daschbach
7e581607e7 * test/lisp/net/dbus-tests.el: Add property tests. (Bug#43252)
(dbus--test-run-property-test, dbus--test-property): New defuns.
(dbus-test06-property-types): New test for property registration,
set, get.
2020-09-30 11:09:17 +02:00
Lars Ingebrigtsen
1993c4e300 Fix gnus-base64-repad test failures 2020-09-30 05:05:09 +02:00
Michael Albinus
7e45ed3a96 More strict D-Bus type checking
* lisp/net/dbus.el (dbus-register-monitor): Register proper key.
(dbus-monitor-handler): Adapt docstring.  Use grave text-quoting-style.

* src/dbusbind.c (xd_signature, xd_append_arg): More strict tests.
(syms_of_dbusbind): Adapt docstring.

* test/lisp/net/dbus-tests.el (dbus-test01-basic-types): Extend test.
2020-09-29 19:43:02 +02:00
Alex Bochannek
eaf224f88d Repad the Face header in Gnus
* lisp/gnus/gnus-fun.el (gnus-convert-face-to-png): Use it.

* lisp/gnus/gnus-util.el (gnus-base64-repad): New function (bug#43441).
2020-09-28 14:09:07 +02:00
Jan Tatarik
232382415d Fix Gnus parsing of weekly recurring icalendar events
* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event:recurring-interval): Fix parsing of weekly
recurring events (bug#43669).

Example: in the absence of explicit INTERVAL value in the calendar
event, a weekly event with occurrences scheduled for Mondays and
Wednesdays should receive the default recurring interval of "1" and the
org mode timestamp repeater should be "+1w".

Due to a bug in the current code we receive "WEEKLY" and "+WEEKLYw"
instead. The patch fixes the issue.
2020-09-28 13:08:37 +02:00
Michael Albinus
4155ca273a Document D-Bus monitoring
* doc/misc/dbus.texi: Replace "symbol" by "keyword" where appropriate.
(Alternative Buses): Adapt dbus-init-bus description.
(Errors and Events): Adapt dbus-event structure.  New defuns
dbus-event-destination-name, dbus-event-handler and dbus-event-arguments.
(Monitoring Events): New node.

* lisp/net/dbus.el: Replace "symbol" by "keyword" where appropriate.
(cl-lib): Require.
(dbus-register-monitor): Adapt the argument list.
(dbus-monitor-handler): Extend.
(dbus-init-bus): Adapt docstring.

* test/lisp/net/dbus-tests.el (dbus-test01-compound-types):
Skip if needed.  Extend test.
2020-09-27 18:59:04 +02:00
Mattias Engdegård
8bd233a7eb Minor string-search optimisations (bug#43598)
* src/fns.c (Fstring_search): Perform cheap all-ASCII checks before more
expensive ones.  Use a faster loop when searching for non-ASCII
non-raw bytes.
* test/src/fns-tests.el (string-search): Add more test cases.
2020-09-27 14:28:07 +02:00
Mattias Engdegård
72e9ec96d0 ; * test/lisp/subr-tests.el (string-replace): Add more test cases 2020-09-27 13:32:27 +02:00
Lars Ingebrigtsen
8c569683f2 Fix searching for multibyte needles in unibyte haystacks
* src/fns.c (Fstring_search): Make this work better when searching
unibyte haystacks for multibyte needles (bug#43598).
2020-09-27 02:01:03 +02:00
Lars Ingebrigtsen
104688feb4 Add tiny optimization for string-search
* src/fns.c (Fstring_search): Add tiny optimization for needles
that are longer than the haystack (bug#43598).
2020-09-27 00:35:11 +02:00
Lars Ingebrigtsen
baf331e40c Rename replace-in-string to string-replace
* doc/lispref/searching.texi (Search and Replace): Update.
* lisp/bindings.el (mode-line-position): Update callers.

* lisp/subr.el (string-replace): Rename from replace-in-string
since that clashes with XEmacs' replace-in-string which is
equivalent to the Emacs replace-regexp-in-string (bug#43598).
2020-09-27 00:24:50 +02:00
Stefan Kangas
e00936bf9f Silence some byte-compiler warnings
* test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode):
* test/lisp/custom-tests.el (cus-test-opts):
* test/lisp/help-fns-tests.el (foo-test-map)
(help-fns-test--describe-keymap-foo):
* test/src/fns-tests.el (w32-collate-ignore-punctuation)
(fns-tests-func-arity): Silence byte-compiler warnings.
2020-09-26 12:03:07 +02:00
Stefan Kangas
2dff3ea073 Repurpose libxml test for obsolete argument
* test/src/xml-tests.el (libxml-tests): Move half this test for the
recently obsoleted fourth argument to libxml-parse-xml-region...
* test/lisp/xml-tests.el (xml-tests--remove-comments): ...to a new
test here for xml-remove-comments.

* test/src/xml-tests.el (libxml-tests--data-comments-discarded):
Move test data from here...
* test/lisp/xml-tests.el (xml-tests--data-with-comments): ...to here.
2020-09-26 11:48:09 +02:00
Glenn Morris
d58e3b3997 Fix out-of-tree make check
* test/lisp/custom-tests.el (custom-test-admin-cus-test): New const.
(check-for-wrong-custom-types): Use it.
2020-09-25 11:01:14 -07:00
Paul Eggert
cc7f971485 Fix out-of-source ‘make check’ emacs-module-tests
Problem reported by Koki Fukuda in:
https://lists.gnu.org/r/emacs-devel/2020-07/msg00169.html
* test/Makefile.in (MODULE_CFLAGS):
Include from the same directories included from in ../src.
* test/src/emacs-module-tests.el (module/describe-function-1):
Strip path to source directory.

(cherry picked from commit c86f3fe0d0)
2020-09-25 10:33:27 -07:00
Mattias Engdegård
497a1ed8bb string-search robustness and documentation improvement (bug#43598)
* src/fns.c (Fstring_search): Check START-POS argument range.
Simplify logic.  Improve doc string.
* test/src/fns-tests.el (string-search): Add test cases.
* doc/lispref/strings.texi (Text Comparison): Elaborate.
* lisp/emacs-lisp/byte-opt.el (pure-fns): Mark string-search as pure.
2020-09-25 17:08:00 +02:00
Lars Ingebrigtsen
664927b525 Add an expensive test for defcustom types
* admin/cus-test.el (cus-test-opts): Return the tests.

* test/lisp/custom-tests.el (check-for-wrong-custom-types): Test
custom types (bug#30990).
2020-09-25 14:46:36 +02:00
Mattias Engdegård
8a253a96a0 Fix replace-in-string infloop with empty pattern string (bug#43598)
* lisp/subr.el (replace-in-string): Raise an error if FROMSTRING is
empty.
* test/lisp/subr-tests.el (replace-in-string): Add test case.
2020-09-25 13:15:42 +02:00
Lars Ingebrigtsen
09adf92644 Fix previous replace-in-string rewrite
* lisp/subr.el (replace-in-string): Fix logic errors in previous
patch.
2020-09-25 02:07:05 +02:00
Lars Ingebrigtsen
7f9ad5980c Fix replace-in-string multibyteness problems with string-search
* lisp/subr.el (replace-in-string): Simplify by using the new
string-search function (bug#43598).
2020-09-25 01:53:16 +02:00
Lars Ingebrigtsen
e51a98b0c2 Add a new function 'string-search'
* doc/lispref/strings.texi (Text Comparison): Document it.
* src/fns.c (Fstring_search): New function.
2020-09-25 01:53:16 +02:00