summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix tramp-test32-shell-command-dont-erase-bufferMichael Albinus2020-04-261-18/+134
| | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test32-shell-command-dont-erase-buffer): Adapt test.
* | Use lexical-binding for rfc2045.el and add testsStefan Kangas2020-04-261-0/+36
| | | | | | | | | | * lisp/mail/rfc2045.el: Use-lexical-binding. * test/lisp/mail/rfc2045-tests.el: New file.
* | Use lexical-binding in dig.el and add testsStefan Kangas2020-04-261-0/+56
| | | | | | | | | | | | | | * lisp/net/dig.el: Use lexical-binding. (dig-program, dig-dns-server, dig-font-lock-keywords): Remove redundant :group args. * test/lisp/net/dig-tests.el: New file.
* | Use lexical-binding in misc.el and add testsStefan Kangas2020-04-261-0/+77
| | | | | | | | | | * lisp/misc.el: Use lexical-binding. * test/lisp/misc-tests.el: New file.
* | Use lexical-binding in po.el and add testsSimen Heggestøyl2020-04-251-0/+68
| | | | | | | | | | | | * lisp/textmodes/po.el: Use lexical-binding. * test/lisp/textmodes/po-tests.el: New file with tests for po.el.
* | ; * test/lisp/international/mule-util-tests.el: Fix typos.Stefan Kangas2020-04-251-2/+2
| |
* | Use lexical-binding for international testsStefan Kangas2020-04-242-1/+3
| | | | | | | | | | * test/lisp/international/mule-util-tests.el: * test/lisp/international/ccl-tests.el: Use lexical-binding.
* | Use lexical-binding for all net testsStefan Kangas2020-04-245-5/+5
| | | | | | | | | | | | | | | | * test/lisp/net/dbus-tests.el: * test/lisp/net/gnutls-tests.el: * test/lisp/net/newsticker-tests.el: * test/lisp/net/puny-tests.el: * test/lisp/net/rfc2104-tests.el: Use lexical-binding.
* | Use lexical-binding for textmodes testsStefan Kangas2020-04-242-2/+2
| | | | | | | | | | * test/lisp/textmodes/mhtml-mode-tests.el: * test/lisp/textmodes/sgml-mode-tests.el: Use lexical-binding.
* | Use lexical-binding in most url testsStefan Kangas2020-04-245-5/+5
| | | | | | | | | | | | | | | | * test/lisp/url/url-auth-tests.el: * test/lisp/url/url-expand-tests.el: * test/lisp/url/url-parse-tests.el: * test/lisp/url/url-tramp-tests.el: * test/lisp/url/url-util-tests.el: Use lexical-binding.
* | Use lexical-binding in most src testsStefan Kangas2020-04-2415-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/charset-tests.el: * test/src/chartab-tests.el: * test/src/cmds-tests.el: * test/src/coding-tests.el (top-level) (generate-ascii-file, generate-mostly-nonascii-file): * test/src/doc-tests.el: * test/src/floatfns-tests.el: * test/src/font-tests.el: * test/src/keymap-tests.el: * test/src/process-tests.el (top-level) (process-test-sentinel-wait-function-working-p) (process-test-stderr-buffer, process-test-stderr-filter): * test/src/textprop-tests.el: * test/src/thread-tests.el: * test/src/timefns-tests.el: * test/src/undo-tests.el: * test/src/xml-tests.el: Use lexical-binding.
* | * test/lisp/net/tramp-tests.elMichael Albinus2020-04-241-1/+2
| | | | | | | | (tramp-test32-shell-command-dont-erase-buffer): Tag it :unstable.
* | Fix string-to-multibyte overlong sequence bugPaul Eggert2020-04-201-0/+14
| | | | | | | | | | | | | | | | | | * src/character.h (MULTIBYTE_LENGTH, MULTIBYTE_LENGTH_NO_CHECK): Remove, replacing with ... (multibyte_length): ... this new function. All callers changed. The new function rejects overlong multibyte forms. * test/src/buffer-tests.el (buffer-multibyte-overlong-sequences): New test.
* | Merge from origin/emacs-27Glenn Morris2020-04-202-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 05089a4d65 (origin/emacs-27) Tweak wording re constant variables a1040861f1 Tweak setcar-related wording 751510f865 * lisp/image-mode.el: Add prefix key 's' and reduce depend... 9261a219ec * doc/emacs/windows.texi (Window Convenience): Decribe mor... e1d42da0d6 Fix mutability glitches reported by Drew Adams 5805df74f5 Improve mutability doc dca35b31d0 Improve mutability documentation 81e7d7f111 Document that quoting yields constants 5734339f40 * doc/lispref/keymaps.texi (Extended Menu Items, Easy Menu... 14a570afae Remove #' and function quoting from lambda forms in manual d5ec18c66b * src/regex-emacs.c (re_match_2_internal): Rework comment ... 4df8a61117 Add new node "Image Mode" to Emacs Manual. d7d5ee6c57 ; Fix a typo in cmdargs.texi (bug#40701) 5e9db48fbe * doc/lispref/display.texi (Customizing Bitmaps): Fix typo. eebfb72c90 Document constant vs mutable objects better 6c187ed6b0 Improve documentation of 'sort-lines' 52288f4b66 Mention 'spam-stat-process-directory-age' in the documenta... 067b070598 ; Fix some typos and doc issues (bug#40695) # Conflicts: # etc/NEWS
| * ; Fix some typos and doc issues (bug#40695)Štěpán Němec2020-04-182-3/+3
| |
* | Use lexical-binding in elide-head.el and add testsSimen Heggestøyl2020-04-191-0/+62
| | | | | | | | | | | | | | | | | | | | * lisp/elide-head.el: Use lexical-binding. (elide-head-headers-to-hide): Remove redundant :group arg. (elide-head-overlay): Use `defvar-local'. (elide-head-show): Fix docstring. * test/lisp/elide-head-tests.el: New file with tests for elide-head.el.
* | Use lexical-binding in apropos.el and add testsSimen Heggestøyl2020-04-181-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/apropos.el: Use lexical-binding and remove redundant :group args. (apropos-words-to-regexp, apropos): Tweak docstrings. (apropos-value-internal): Replace '(if x (progn y))' with '(when x y)'. (apropos-format-plist): Add docstring and replace '(if x (progn y))' with '(when x y)'. * test/lisp/apropos-tests.el: New file with tests for apropos.el.
* | Merge from origin/emacs-27Glenn Morris2020-04-181-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | f3b62b6c62 (origin/emacs-27) Avoid crashes in regex-emacs.c due to GC 175c61c18b Fix "C-u M-!" when 'shell-command-dont-erase-buffer' is no... 6b297519b5 Fix cl-most-positive-float doc typo c36c5a3ded ; lisp/ldefs-boot.el: Update. 3876a60569 Fix a typo in calculator.el 9e832ba91b * lisp/erc/erc.el: Add URL to the new ERC page on the Emac... # Conflicts: # etc/NEWS
| * Fix "C-u M-!" when 'shell-command-dont-erase-buffer' is non-nilEli Zaretskii2020-04-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/simple.el (shell-command-dont-erase-buffer): Clarify the effect of the various values in the doc string. (shell-command-save-pos-or-erase, shell-command): Don't move or push point if the output will go to the current buffer. (Bug#40690) (shell-command): Mention 'shell-command-dont-erase-buffer' in the doc string. * test/lisp/simple-tests.el (with-shell-command-dont-erase-buffer): Don't is shell quoting 'like this', as it doesn't work on MS-Windows; quote "like this" instead. (simple-tests-shell-command-dont-erase-buffer): Adapt the test to the new modus operandi. * doc/emacs/misc.texi (Single Shell): Document the effect of the various values of 'shell-command-dont-erase-buffer'. * etc/NEWS: Expand and reword the entry regarding changes in 'shell-command-dont-erase-buffer'.
* | Merge from origin/emacs-27Glenn Morris2020-04-152-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | a5f7c26907 (origin/emacs-27) * admin/authors.el: Add an author alias. d87a4d1f4e Limit RLIMIT_NOFILE to FD_SETSIZE on macOS e5ca8e5e73 Fix Elisp manual entry on 'set-window-configuration' 485f24223f ; Update ChangeLog.3 8f200254fb ; Update etc/AUTHORS c7adc851ad * admin/authors.el: Add missing author aliases. 4acdd7fe58 Fix edge case errors in filename-matching regexps 5f36e21fe5 Clarify the doc string of 'yank' 13301d4266 New function erc-track-switch-buffer-other-window 38f7538d8f New function erc-switch-to-buffer-other-window # Conflicts: # etc/NEWS
| * Fix edge case errors in filename-matching regexpsMattias Engdegård2020-04-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These changes fix actual or latent bugs in regexps that match file names, such as PATTERN arguments to 'directory-files'. See https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00265.html * admin/authors.el (authors-obsolete-files-regexps) (authors-renamed-files-regexps): * lisp/auth-source-pass.el (auth-source-pass-entries): * lisp/calendar/todo-mode.el (todo-show, todo-find-filtered-items-file) (todo-filter-items, todo-reset-nondiary-marker, todo-reset-done-string) (todo-reset-comment-string, todo-reset-highlight-item): * lisp/cedet/semantic/db-ebrowse.el (semanticdb-load-ebrowse-caches): * lisp/cedet/semantic/texi.el (semantic-texi-associated-files): * lisp/cedet/srecode/map.el (srecode-map-update-map): * lisp/dired.el (dired-re-no-dot): * lisp/emacs-lisp/autoload.el (update-directory-autoloads): * lisp/emacs-lisp/shadow.el (load-path-shadows-find): * lisp/files.el (auto-mode-alist, directory-files-no-dot-files-regexp): * lisp/finder.el (finder-compile-keywords): * lisp/generic-x.el (inetd-conf-generic-mode, named-boot-generic-mode) (resolve-conf-generic-mode, etc-modules-conf-generic-mode): * lisp/gnus/gnus-agent.el (gnus-agent-read-agentview) (gnus-agent-regenerate-group, gnus-agent-update-files-total-fetched-for): * lisp/gnus/gnus-cache.el (gnus-cache-articles-in-group): * lisp/gnus/gnus-score.el (gnus-score-search-global-directories): * lisp/gnus/gnus-util.el (gnus-delete-directory): * lisp/gnus/gnus-uu.el (gnus-uu-dir-files): * lisp/gnus/nndraft.el (nndraft-request-group): * lisp/gnus/nnmh.el (nnmh-request-group, nnmh-request-create-group): (nnmh-request-delete-group, nnmh-active-number, nnmh-update-gnus-unreads): * lisp/gnus/nnspool.el (nnspool-request-group): * lisp/gnus/spam-stat.el (spam-stat-process-directory) (spam-stat-test-directory): * lisp/help-fns.el (help-fns--first-release): * lisp/help.el (view-emacs-news): * lisp/international/quail.el (quail-update-leim-list-file): * lisp/international/titdic-cnv.el (batch-titdic-convert): * lisp/mail/mspools.el (mspools-set-vm-spool-files) (mspools-get-spool-files): * lisp/mail/rmail.el (rmail-secondary-file-regexp) (rmail-speedbar-match-folder-regexp): * lisp/net/ange-ftp.el (ange-ftp-delete-directory): * lisp/net/tramp.el (tramp-use-absolute-autoload-file-names): * lisp/obsolete/gulp.el (gulp-send-requests): * lisp/obsolete/vc-arch.el (vc-arch-trim-revlib): * lisp/org/ob-core.el (org-babel-remove-temporary-directory): * lisp/progmodes/ebnf2ps.el (ebnf-file-suffix-regexp, ebnf-style-database): * lisp/progmodes/executable.el (executable-command-find-posix-p): * lisp/startup.el (command-line): * lisp/textmodes/refer.el (refer-get-bib-files): * lisp/url/url-about.el (url-probe-protocols): * lisp/vc/vc-rcs.el (vc-rcs-register, vc-rcs-unregister): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test19-directory-files-and-attributes): * test/lisp/net/tramp-tests.el (tramp-test19-directory-files-and-attributes): Replace ^ and $ with \` and \', respectively. Use (rx (or (not ".") "...")), translated into "[^.]\\|\\.\\.\\.", to match anything but "." and "..", instead of several incorrect regexps.
* | Fix hi-lock test and add new test for unhighlight (bug#40337)Juri Linkov2020-04-141-3/+59
| | | | | | | | | | | | | | | | | | * lisp/hi-lock.el (hi-lock-unface-buffer): Use hi-lock--hashcons only on strings, not lists. * test/lisp/hi-lock-tests.el (hi-lock-bug26666): Revert previous change, use "a" instead of "b". (hi-lock-unhighlight): New test.
* | Fix hi-lock test and add new test for case-fold (bug#40337)Juri Linkov2020-04-131-1/+101
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/hi-lock.el (hi-lock--regexps-at-point): Handle font-lock faces. (hi-lock-unface-buffer): Simplify default value handling. (hi-lock-set-pattern): Add either lighter or regexp to hi-lock-interactive-lighters. (hi-lock-set-pattern): Put overlay prop hi-lock-overlay-regexp to either lighter or regexp. * test/lisp/hi-lock-tests.el (hi-lock-bug26666): Use "b" instead of "a". (hi-lock-case-fold): New test.
* | Fix error in 'call-process-region' when START is nil (Bug#40576)Philipp Stephani2020-04-121-0/+10
| | | | | | | | | | | | | | | | * src/callproc.c (Fcall_process_region): Fix behavior when START is nil and DELETE is non-nil. * test/src/callproc-tests.el (call-process-region-entire-buffer-with-delete): New unit test.
* | ; * test/src/callproc-tests.el: Fix checkdoc errors.Philipp Stephani2020-04-121-0/+7
| |
* | Set last-coding-system-used upon ASCII conversion bypass (bug#40407)Mattias Engdegård2020-04-091-1/+2
| | | | | | | | | | | | | | | | Spotted by Kazuhiro Ito. * src/coding.c (code_convert_string): Set Vlast_coding_system if appropriate. * test/src/coding-tests.el (coding-nocopy-ascii): Add test.
* | Fix ASCII-only conversion logic (bug#40407)Mattias Engdegård2020-04-091-12/+21
| | | | | | | | | | | | | | | | | | | | | | To sidestep conversion altogether when EOL conversion applies, we must either be encoding a string without NL, or decoding without CR. * src/coding.c (string_ascii_p): Revert to a pure predicate. (code_convert_string): Fix logic. Don't use uninitialised ascii_p (removed). Use memchr to detect CR or LF in string when needed. * test/src/coding-tests.el (coding-nocopy-ascii): Update tests to include encodings with explicit EOL conversions.
* | chinese-hz is not ASCII compatible (bug#40407)Mattias Engdegård2020-04-091-0/+3
| | | | | | | | | | * lisp/language/chinese.el: Disable :ascii-compatible-p for chinese-hz. * test/lisp/international/mule-tests.el (mule-hz): New test.
* | Don't crash with invalid argument in check-coding-systems-regionMattias Engdegård2020-04-091-0/+8
| | | | | | | | | | | | | | * src/coding.c (Fcheck_coding_systems_region): Don't crash if the third arg contains something that isn't a coding system. * test/src/coding-tests.el (coding-check-coding-systems-region): New test.
* | Fix decoding ASCII strings with embedded CR charactersEli Zaretskii2020-04-091-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | * src/coding.c (string_ascii_p): Return a negative value if an all-ASCII string STR includes the CR character, otherwise a positive value. (code_convert_string): If the string is ASCII, but includes CR characters, use the fast path only if EOL doesn't need to be decoded. (Bug#40519) * test/src/coding-tests.el (coding-nocopy-ascii): Add tests for bug#40519.
* | utf-7 and utf-7-imap are not ASCII-compatible (bug#40407)Mattias Engdegård2020-04-061-0/+18
| | | | | | | | | | | | | | * lisp/international/mule-conf.el (utf-7, utf-7-imap): Add expedient to disable the :ascii-compatible-p property set automatically by define-coding-system. * test/lisp/international/mule-tests.el (mule-utf-7): New test.
* | Fix case that $PATH is longer than 4096 chars in TrampMichael Albinus2020-04-061-51/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-sh.el (tramp-set-remote-path): Use `tramp-send-command' directly. * test/lisp/net/tramp-tests.el (tramp-test-vec): New defconst. (tramp--test-enabled, tramp--test-message) (tramp--test-backtrace, tramp-test03-file-name-host-rules) (tramp-test18-file-attributes, tramp-test20-file-modes) (tramp-test26-file-name-completion) (tramp-test33-environment-variables, tramp-test35-remote-path) (tramp-test36-vc-registered, ) (tramp-test43-asynchronous-requests): Use it. (tramp-test29-start-file-process, tramp-test30-make-process) (tramp-test33-environment-variables): Remove Hydra specific result. (tramp-test35-remote-path): Rewrite partially.
* | Merge from origin/emacs-27Glenn Morris2020-04-051-0/+25
|\ \ | |/ | | | | | | | | | | | | | | | | | | 6de20c7eab (origin/emacs-27) Fix syntax error in man page. f8607d3c03 Handle filling of indented ChangeLog function entries 7e78f0d1b2 Fix void-variable n-reb in re-builder (Bug#40409) 452d776a5d Fix small bug in copy_string_contents. fa823653ff Fix invocations of gpg from Gnus d4f51d0a2e Don't draw GTK's internal border and tab bar on top of eac... 38731d504e ; * src/buffer.c (syms_of_buffer) <inhibit-read-only>: Doc... 44ac9e48bb Tweak htmlfontify's generated output
| * Handle filling of indented ChangeLog function entriesNoam Postavsky2020-04-041-0/+25
| | | | | | | | | | | | * lisp/vc/log-edit.el (log-edit-fill-entry): Relax regexp a bit to recognize function entries with leading blanks. * test/lisp/vc/log-edit-tests.el: New test.
* | Avoid expensive recoding for ASCII identity cases (bug#40407)Mattias Engdegård2020-04-051-0/+11
| | | | | | | | | | | | | | | | | | | | Optimise for the common case of encoding or decoding an ASCII-only string using an ASCII-compatible coding, for file names in particular. * src/coding.c (string_ascii_p): New function. (code_convert_string): Return the input string for ASCII-only inputs and ASCII-compatible codings. * test/src/coding-tests.el (coding-nocopy-ascii): New test.
* | Suppress relint diagnostics in rx-tests.elMattias Engdegård2020-04-051-0/+6
| | | | | | | | | | * test/lisp/emacs-lisp/rx-tests.el (rx-char-any, rx-any): Suppress relint complaints; these regexps are intentionally bad.
* | Fix inverted NOCOPY encode/decode parameter (bug#40407)Mattias Engdegård2020-04-051-0/+8
| | | | | | | | | | | | | | | | | | | | In {encode,decode}-coding-string, the NOCOPY parameter had the opposite effect to what was intended and documented. This 18 year old bug (introduced in 4031e2bf0a) only affected calls with CODING-SYSTEM being nil. * src/coding.c (code_convert_string): Correct use of NOCOPY. * test/src/coding-tests.el (coding-nocopy-trivial): New test.
* | Make make-{network,serial}-process handle :coding nil consistentlyRobert Pluim2020-04-031-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The handling of :coding nil was different between make-{network,serial}-process and make-{pipe}process. Now they all handle :coding nil as if :coding had not been specified. * process.c (Fmake_serial_process) (set_network_socket_coding_system): Use plist-get to check if :coding has been specified instead of plist-member, to ensure that ":coding nil" does not override coding-system-for-{read,write}. * network-stream-tests.el (check-network-process-coding-system-bind) (check-network-process-coding-system-no-override) (check-network-process-coding-system-override): New tests. * etc/NEWS: Describe change in make-network-process and make-serial-process :coding behavior.
* | Improve last changeEli Zaretskii2020-04-031-1/+2
| | | | | | | | | | * lisp/calendar/time-date.el (date-days-in-month): Improve the error message text and make sure MONTH is a number. (Bug#40217)
* | Error out if 'date-days-in-month' is given an invalid monthAlex Branham2020-04-031-1/+2
| | | | | | | | | | | | | | * lisp/calendar/time-date.el (date-days-in-month): Add test for month validity; signal an error if it isn't. (Bug#40217) * test/lisp/calendar/time-date-tests.el (test-days-in-month): Add a test for the new error.
* | Copy INSIDE_EMACS env variable to subprocesses in Eshell (Bug#25496)Federico Tedin2020-04-021-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/eshell/em-dirs.el (eshell-dirs-initialize): Add INSIDE_EMACS variable to buffer-local value of eshell-variable-aliases-alist. (eshell-inside-emacs): Add new constant used for INSIDE_EMACS. * lisp/eshell/esh-var.el (eshell-variable-aliases-list): Update doc string; remove mention of eshell-user-aliases-list and explain that variables can optionally be copied to subprocesses' environments. * test/lisp/eshell/eshell-tests.el (eshell-test/inside-emacs-var): Add test for the INSIDE_EMACS variable. * etc/NEWS: Announce changes.
* | ; * test/lisp/net/tramp-tests.el (tramp-test30-make-process): Instrument.Michael Albinus2020-04-021-1/+2
| |
* | javac support in compilation-parse-errors rulesFilipp Gunbin2020-04-011-2/+5
| | | | | | | | | | | | | | | | | | | | | | * etc/compilation.txt: Add doc and example. * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Add javac rule. (compilation-parse-errors): Fix file/line/col test, so that lambda/closure (which are valid values) don't match. * test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data, compile-test-error-regexps): Add test.
* | Mark recently failing Tramp tests on hydraGlenn Morris2020-03-301-0/+3
| | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test33-environment-variables): Expect failure on hydra.nixos.org, since March 29 Tramp cache changes.
* | Merge from origin/emacs-27Glenn Morris2020-03-301-0/+11
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | c6e0981b96 (origin/emacs-27) * lisp/image/image-converter.el: Fix cus... 461bd9cc20 Fix url-cookie.el for lexical binding f3ccfb1926 ; * src/decompress.c: Fix comment style. 1af03e7e92 ; * src/xfaces.c (syms_of_xfaces): Fix wording and typo. 93945fcd19 ; * test/lisp/calc/calc-tests.el: Fix mistake in last commit ee47e00f4e Don't suggest setting face-remapping-alist to a literal (B... c2b8ce4439 Calc: don't treat nil as an integer (bug#40155) e1f0e08922 * lisp/files.el (directory-files-recursively): Doc fix. (... 02b3820315 Document how to disable Tramp file archives
| * ; * test/lisp/calc/calc-tests.el: Fix mistake in last commitMattias Engdegård2020-03-291-1/+1
| |
| * Calc: don't treat nil as an integer (bug#40155)Mattias Engdegård2020-03-271-0/+11
| | | | | | | | | | | | | | | | | | | | | | Make Math-num-integerp return false for nil, following Math-integerp which was changed in the bignum reform. This fixes a crash in calc-graph-fast. Reported by Narendra Joshi. * lisp/calc/calc-macs.el (Math-num-integerp): Not true for nil. * test/lisp/calc/calc-tests.el (calc-Math-integerp): New tests.
* | Port the 'module/async-pipe' test to MS-WindowsEli Zaretskii2020-03-272-7/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These changes let the code compile and produce a valid DLL, but the test hangs. It looks like the hang is in Fdelete_process, when it closes one of the descriptors of the pipe process. In addition, this use of the pipe process cannot currently work on MS-Windows, since make-pipe-process doesn't set up the reader thread to read from the Emacs's side of the pipe, so the select emulation doesn't know there's stuff to read from that pipe. * test/data/emacs-module/mod-test.c [WINDOWSNT]: Include windows.h. (ALIGN_STACK) [!__x86_64__]: Define for 32-bit builds. (sleep_for_half_second): New function. (write_to_pipe): Declare return type differently for WINDOWSNT. Call sleep_for_half_second. (Fmod_test_async_pipe) [WINDOWSNT]: Use _beginthread as substitute for pthread_create. (invalid_finalizer): Replace non_ASCII character in a comment. * test/src/emacs-module-tests.el (module/async-pipe): Skip on MS-Windows, as the test fails and then hangs.
* | Add a module function to open a file descriptor connected to a pipe.Philipp Stephani2020-03-262-2/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common complaint about the module API is that modules can't communicate asynchronously with Emacs. While it isn't possible to call arbitrary Emacs functions asynchronously, writing to a pipe should always be fine and is a pretty low-hanging fruit. This patch implements a function that adapts an existing pipe process. That way, users can use familiar tools like process filters or 'accept-process-output'. * src/module-env-28.h: Add 'open_channel' module function. * src/emacs-module.c (module_open_channel): Provide definition for 'open_channel'. (initialize_environment): Use it. * src/process.c (open_channel_for_module): New helper function. (syms_of_process): Define necessary symbol. * test/src/emacs-module-tests.el (module/async-pipe): New unit test. * test/data/emacs-module/mod-test.c (signal_system_error): New helper function. (signal_errno): Use it. (write_to_pipe): New function running in the background. (Fmod_test_async_pipe): New test module function. (emacs_module_init): Export it. * doc/lispref/internals.texi (Module Misc): Document new module function. * doc/lispref/processes.texi (Asynchronous Processes): New anchor for pipe processes. * etc/NEWS: Document 'open_channel' function.
* | Fix gravatar testsRobert Pluim2020-03-241-1/+1
| | | | | | | | | | | | | | | | * lisp/image/gravatar.el (gravatar--service-libravatar): Don't error when failing to parse email address, just return the default URL. * test/lisp/image/gravatar-tests.el (gravatar-build-url): Adjust for new default gravatar url.