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

3844 Commits

Author SHA1 Message Date
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
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
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
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
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