aboutsummaryrefslogtreecommitdiffstats
path: root/test/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-012-2/+2
|
* Merge from origin/emacs-28Eli Zaretskii2022-01-0147-47/+47
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-0147-47/+47
| |
| * Be more allowing when looking for menu-bar itemsStefan Kangas2021-10-281-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Don't merge to master. This is a safe-for-release fix for Bug#50752. * src/keymap.c (lookup_key_1): Factor out function from Flookup_key. (Flookup_key): Be case insensitive when looking for Qmenu_bar items. (Bug#50752) * test/src/keymap-tests.el (keymap-lookup-key/mixed-case) (keymap-lookup-key/mixed-case-multibyte): New tests.
* | `make-finalizer' now has to be called with a function, so adjust testLars Ingebrigtsen2021-12-311-1/+1
| |
* | Use defvar-keymap in testsStefan Kangas2021-12-261-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/button-tests.el (button-tests--map): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-keymap): * test/lisp/help-tests.el (help-tests-remap-map) (help-tests-major-mode-map, help-tests-minor-mode-map): * test/lisp/kmacro-tests.el (kmacro-tests-keymap): * test/lisp/repeat-tests.el (repeat-tests-map) (repeat-tests-repeat-map): * test/src/keymap-tests.el (keymap-tests-minor-mode-map) (keymap-tests-major-mode-map): Use defvar-keymap.
* | Add test for text-char-descriptionStefan Kangas2021-12-261-0/+15
| | | | | | | | | | * test/src/keymap-tests.el (keymap-text-char-description): New test.
* | Declare functions to silence byte-compilerStefan Kangas2021-12-213-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/auth-source.el (gnutls-symmetric-decrypt, gnutls-ciphers): * lisp/net/dbus.el (libxml-parse-xml-region): * lisp/simple.el (thread-name): * lisp/thread.el (thread-name, thread-signal, thread--blocker) (current-thread, thread-live-p, all-threads): * test/lisp/emacs-lisp/multisession-tests.el (sqlite-close): * test/lisp/net/gnutls-tests.el (gnutls-symmetric-decrypt) (gnutls-symmetric-encrypt, gnutls-hash-mac, gnutls-hash-digest) (gnutls-ciphers, gnutls-digests, gnutls-macs): * test/lisp/net/network-stream-tests.el (gnutls-peer-status): * test/lisp/net/shr-tests.el (libxml-parse-html-region): * test/src/decompress-tests.el (zlib-decompress-region): * test/src/process-tests.el (thread-last-error, thread-join) (make-thread): * test/src/xml-tests.el (libxml-parse-xml-region): Declare functions to silence byte-compiler in --without-all builds.
* | Fix some tests in --without-all buildsStefan Kangas2021-12-212-1/+1
| | | | | | | | | | | | | | * test/lisp/image-tests.el (image-type/from-filename): * test/src/image-tests.el (image-tests-init-image-library): * test/src/thread-tests.el (threads-test-bug33073): Fix tests in --without-all builds.
* | Fix sloppy base64 acceptance of some multibyte charactersMattias Engdegård2021-12-201-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | The base64 encoding functions incorrectly accepted some multibyte characters; stop doing that (bug#52670). * src/fns.c (base64_encode_1): Reject all multibyte characters. * test/src/fns-tests.el (fns-tests-base64-encode-string) (fns-test-base64url-encode-region) (fns-test-base64url-encode-string): Add tests. * doc/lispref/text.texi (Base 64): Rephrase outdated manual text. * etc/NEWS: Add a notice.
* | Silence byte-compiler warnings from absent optional featuresMattias Engdegård2021-12-203-0/+9
| | | | | | | | | | | | | | | | * test/src/inotify-tests.el (inotify-rm-watch): * test/src/lcms-tests.el (lcms-xyz->jch): * test/src/sqlite-tests.el (sqlite-open): Add declarations to prevent byte-compilation warnings when features are absent.
* | Add some very rudimentary field-beginning/end testsLars Ingebrigtsen2021-12-191-0/+13
| |
* | ; Fix last change to filelock-tests.elEli Zaretskii2021-12-191-5/+13
| | | | | | | | | | | | | | * test/src/filelock-tests.el (filelock-tests-file-locked-p-spoiled) (filelock-tests-unlock-spoiled) (filelock-tests-kill-buffer-spoiled): Expect 'permission-denied' only on MS-Windows.
* | New error symbol 'permission-denied'Eli Zaretskii2021-12-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/fileio.c (syms_of_fileio) <permission-denied>: Define the symbol and its 'err-conditions' and 'error-message' properties. (get_file_errno_data): Return permission-denied on EACCES. * test/src/filelock-tests.el (filelock-tests-file-locked-p-spoiled) (filelock-tests-unlock-spoiled) (filelock-tests-kill-buffer-spoiled): Adapt the tests to the new error symbol. * doc/lispref/errors.texi (Standard Errors): * etc/NEWS: Document 'permission-denied' error.
* | Skip extension tests on hosts without the functionLars Ingebrigtsen2021-12-161-0/+1
| |
* | Only allow SQLite extensions from an allowlistLars Ingebrigtsen2021-12-141-0/+32
| | | | | | | | | | * src/sqlite.c (Fsqlite_load_extension): Only allow extensions from an allowlist.
* | Fix some compilation warnings in sqlite-less buildsdick r. chiang2021-12-121-0/+10
| | | | | | | | | | | | * test/src/sqlite-tests.el: * lisp/sqlite-mode.el: Avoid compilation warnings in builds without libsqlite (bug#52440).
* | Fix Fsqlite_finalize book-keepingLars Ingebrigtsen2021-12-111-1/+3
| | | | | | | | * src/sqlite.c (Fsqlite_finalize): Mark the object as dead.
* | Fix some sqlite doc string typosLars Ingebrigtsen2021-12-111-2/+0
| | | | | | | | | | * src/sqlite.c (Fsqlite_load_extension, Fsqlite_more_p): Fix typos in doc strings.
* | Add sqlite3 support to EmacsLars Ingebrigtsen2021-12-111-0/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Add check for the sqlite library. * doc/lispref/text.texi (Database): Document it. * lisp/sqlite.el: New file. * lisp/term/w32-win.el (dynamic-library-alist): Add a mapping. * src/Makefile.in (SQLITE3_LIBS): Add the libraries. * src/alloc.c (union emacs_align_type): Add a Lisp_Sqlite struct. * src/data.c (Ftype_of): Add sqlite. * src/emacs.c (main): Load the syms. * src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN): Add PVEC_SQLITE. (GCALIGNED_STRUCT): New struct to keep data for sqlite database objects and statement objects. (SQLITEP, SQLITE, CHECK_SQLITE, XSQLITE): New macros for accessing the objects. * src/pdumper.c (dump_vectorlike): Update hash. (dump_vectorlike): Don't dump it. * src/print.c (print_vectorlike): Add a printer for the sqlite object. * src/sqlite.c: New file. * test/src/sqlite-tests.el: Add tests.
* | Add time-convert testsPaul Eggert2021-12-051-0/+12
| | | | | | | | * test/src/timefns-tests.el (time-convert-forms): New test.
* | Silence byte-compiler in some testsStefan Kangas2021-12-042-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/dired-tests.el: * test/lisp/emacs-lisp/cl-macs-tests.el: * test/lisp/emacs-lisp/derived-tests.el: * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: * test/lisp/emacs-lisp/generator-tests.el: * test/lisp/emacs-lisp/lisp-tests.el: * test/lisp/emacs-lisp/seq-tests.el (test-seq-let) (test-seq-setq): * test/lisp/emacs-lisp/subr-x-tests.el (subr-x-test-if-let*-false) (subr-x-test-if-let*-and-laziness-is-preserved) (subr-x-test-when-let*-false) (subr-x-test-when-let*-and-laziness-is-preserved): * test/lisp/emacs-lisp/timer-tests.el (timer-tests-debug-timer-check): * test/lisp/format-spec-tests.el (format-spec-do-flags-truncate) (format-spec-do-flags-pad): * test/lisp/ls-lisp-tests.el (ls-lisp-test-bug27762): * test/lisp/obsolete/cl-tests.el (labels-function-quoting): * test/lisp/progmodes/elisp-mode-tests.el: * test/lisp/replace-tests.el (replace-regexp-bug45973): * test/lisp/ses-tests.el: * test/lisp/subr-tests.el: * test/lisp/tar-mode-tests.el (tar-mode-test-tar-grind-file-mode): * test/src/data-tests.el (data-tests--set-default-per-buffer): * test/src/search-tests.el (test-replace-match-modification-hooks): Silence byte-compiler.
* | * test/src/comp-tests.el: Rework last patchStefan Monnier2021-11-271-29/+28
| | | | | | | | | | | | | | | | | | | | | | Move `require`s out of `eval-when-compile` if the functions are called at run-time. Don't use #' to quote symbols (i.e. at those places where a lambda expression couldn't be used). Don't pre-load comp-test-45603.el and comp-test-pure.el any more. (comp-deftest pure): Use `declare-function` after loading `comp-test-pure.el` to silence the byte-compiler.
* | * test/src/comp-tests.el: Eliminate byte-compiler warnings (Bug#52105).Stephen Gildea2021-11-261-10/+27
| |
* | Tag a test from process-tests.el as :unstable on emba.Michael Albinus2021-11-251-0/+1
| | | | | | | | | | * test/src/process-tests.el (process-tests/multiple-threads-waiting): Tag it as :unstable on emba.
* | Add support for the min-width display propertyLars Ingebrigtsen2021-11-241-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/display.texi (Display Property): Document get-display-property. (Other Display Specs): Document min-width property. * src/dispextern.h (struct it): Add fields for min-width handling. * src/xdisp.c (find_display_property, get_display_property): New helper functions. (display_min_width): Insert stretch glyphs based on the min width. (Fget_display_property): New defun. (handle_display_prop): Handle min-width ends. (handle_single_display_spec): Handle min-width starts.
* | Make 'eval' use lexical scoping in most testsStefan Kangas2021-11-201-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/electric-tests.el (electric-pair-define-test-form) (define-electric-pair-test): * test/lisp/emacs-lisp/backtrace-tests.el (backtrace-tests--uncompiled-functions): * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-test--symbol-macrolet): * test/lisp/emacs-lisp/let-alist-tests.el (let-alist-list-to-sexp): * test/lisp/emacs-lisp/lisp-tests.el (elisp-tests-with-temp-buffer, core-elisp-tests-3-backquote): * test/lisp/emacs-lisp/testcover-resources/testcases.el (testcover-testcase-nth-case): * test/lisp/ffap-tests.el (ffap-ido-mode): * test/lisp/files-tests.el (file-test--do-local-variables-test): * test/lisp/net/tramp-tests.el (tramp--test-utf8): * test/lisp/progmodes/elisp-mode-tests.el (find-defs-defgeneric-eval, find-defs-defun-eval) (find-defs-defvar-eval, find-defs-face-eval) (find-defs-feature-eval): Give 'eval' non-nil LEXICAL argument. * test/lisp/subr-tests.el (subr-tests--dolist--wrong-number-of-args): * test/src/eval-tests.el (eval-tests--if-dot-string) (eval-tests--mutating-cond) (eval-tests-19790-backquote-comma-dot-substitution): Test 'eval' using LEXICAL as both nil and non-nil. (eval-tests--let-with-circular-defs): Give explicit nil to 'eval'.
* | Turn mistaken functions into tests (bug#51941)Mattias Engdegård2021-11-181-1/+1
| | | | | | | | | | | | | | | | | | * test/lisp/calendar/icalendar-tests.el (icalendar-tests--decode-isodatetime): * test/src/eval-tests.el (eval-tests-19790-backquote-comma-dot-substitution): Change `defun` into `ert-deftest` where this seems to have been the original intention.
* | Do not exclude emacs-module-tests.el on embaMichael Albinus2021-11-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | * test/infra/gitlab-ci.yml (test-native-comp-speed0) (test-all-inotify): Do not exclude emacs-module-tests.el. * test/src/emacs-module-tests.el (module--test-assertions--load-non-live-object) (module--test-assertions--load-non-live-object-with-global-copy) (module--test-assertions--call-emacs-from-gc) (module--test-assertions--globref-invalid-free): Tag them as :unstable on emba. (Bug#50902)
* | Eliminate ERT test name clashes (bug#51941)Mattias Engdegård2021-11-182-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/electric-tests.el (js-mode-braces-with-layout-and-indent): * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-test-fifth): * test/lisp/thingatpt-tests.el (test-symbol-thing-2): Remove duplicated tests. * test/lisp/emacs-lisp/generator-tests.el (cps-loop): * test/lisp/emacs-lisp/ring-tests.el (ring-tests-insert): * test/lisp/help-tests.el (help-tests-substitute-command-keys/no-change): * test/lisp/net/netrc-tests.el (test-netrc-credentials): * test/lisp/progmodes/elisp-mode-tests.el (elisp-completes-functions-after-let-bindings): * test/lisp/thingatpt-tests.el (test-symbol-thing-3): * test/src/buffer-tests.el (deftest-overlayp-1, buffer-tests--*): * test/src/buffer-tests.el (test-buffer-swap-text-1): * test/src/data-tests.el (binding-test-set-constant-nil) (data-tests-logcount): Rename clashing tests.
* | Allow removing keymap definitionsLars Ingebrigtsen2021-11-161-0/+34
| | | | | | | | | | | | | | | | | | | | * src/keymap.c (initial_define_lispy_key): Adjust caller. (store_in_keymap): Allow removing definitions in addition to setting them to nil. (Fdefine_key): Ditto. (define_as_prefix): Adjust caller. * src/term.c (term_get_fkeys_1): Adjust caller.
* | * src/lread.c (read_escape): Fix handling of ?\C-<char> for chars 128-255Stefan Monnier2021-11-141-0/+4
| |
* | Prefer ert-with-temp-(directory|file) in most remaining testsStefan Kangas2021-11-084-83/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/auth-source-tests.el (auth-source-test-searches): * test/lisp/autorevert-tests.el (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) (auto-revert-test07-auto-revert-several-buffers): * test/lisp/calendar/icalendar-tests.el (icalendar-tests--do-test-cycle): * test/lisp/custom-tests.el (custom-theme--load-path): * test/lisp/dired-aux-tests.el (dired-test-bug27496) (with-dired-bug28834-test): * test/lisp/emacs-lisp/bytecomp-tests.el (test-byte-comp-compile-and-load) (bytecomp-tests--dest-mountpoint) (bytecomp-tests--target-file-no-directory): * test/lisp/emacs-lisp/gv-tests.el (gv-tests--in-temp-dir): * test/lisp/eshell/eshell-tests.el (with-temp-eshell) (eshell-test-command-result): * test/lisp/info-xref-tests.el (info-xref-test-makeinfo): * test/lisp/vc/vc-tests.el (vc-test--create-repo) (vc-test--register, vc-test--state, vc-test--working-revision) (vc-test--checkout-model, vc-test--rename-file) (vc-test--version-diff): * test/src/buffer-tests.el (test-kill-buffer-auto-save-delete): * test/src/comp-tests.el (comp-tests-bootstrap): * test/src/process-tests.el (process-test-quoted-batfile): Prefer 'ert-with-temp-(directory|file)' to using 'make-temp-file' directly.
* | Improve detection of suspiciously reordered text segmentsEli Zaretskii2021-11-071-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/bidi.c (bidi_find_first_overridden): Detect reordered weak and neutral characters as well. * lisp/international/mule-cmds.el (highlight-confusing-reorderings): Count and announce how many instances were found. * test/src/xdisp-tests.el (xdisp-tests--find-directional-overrides-case-3): New test. (xdisp-tests--find-directional-overrides-case-2): Adjust expected result.
* | Prefer ert-with-temp-(directory|file)Stefan Kangas2021-11-074-62/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/abbrev-tests.el (read-write-abbrev-file-test) (read-write-abbrev-file-test-with-props) (abbrev-edit-save-to-file-test): * test/lisp/auth-source-tests.el (auth-source-test-netrc-create-secret) (auth-source-delete): * test/lisp/autoinsert-tests.el (autoinsert-tests-auto-insert-file): * test/lisp/bookmark-tests.el (with-bookmark-test-save-load): * test/lisp/buff-menu-tests.el (buff-menu-24962): * test/lisp/calendar/icalendar-tests.el (icalendar-tests--do-test-export): * test/lisp/calendar/todo-mode-tests.el (with-todo-test): * test/lisp/dired-tests.el (dired-test-bug27243-01, dired-test-bug27243-02) (dired-test-bug27243-03, dired-test-bug27631) (dired-test-bug27968, dired-test-with-temp-dirs): * test/lisp/dired-x-tests.el (dired-test-bug25942): * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--with-temp-file): * test/lisp/emacs-lisp/check-declare-tests.el (check-declare-tests-scan) (check-declare-tests-verify-mismatch): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-with-normal-env): * test/lisp/emacs-lisp/package-tests.el (with-package-test) (package-test-signed): * test/lisp/emacs-lisp/testcover-tests.el (testcover-tests-markup-region) (testcover-tests-run-test-case): * test/lisp/emulation/viper-tests.el (viper-test-undo-kmacro): * test/lisp/epg-tests.el (with-epg-tests): * test/lisp/eshell/em-hist-tests.el (eshell-write-readonly-history): * test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27631): * test/lisp/ffap-tests.el (ffap-tests-25243): * test/lisp/files-tests.el (files-tests-bug-18141) (files-tests-read-file-in-~, files-tests-make-directory) (files-tests-copy-directory, files-tests-executable-find) (files-tests-dont-rewrite-precious-files) (files-tests--save-some-buffers): * test/lisp/ls-lisp-tests.el (ls-lisp-test-bug27631): * test/lisp/mail/uudecode-tests.el (uudecode-tests-decode-region-internal) (uudecode-tests-decode-region-external): * test/lisp/net/browse-url-tests.el (browse-url-tests-delete-temp-file): * test/lisp/progmodes/elisp-mode-tests.el (xref--case-insensitive): * test/lisp/progmodes/etags-tests.el (etags-buffer-local-tags-table-list): * test/lisp/progmodes/flymake-tests.el (ruby-backend): * test/lisp/progmodes/python-tests.el (python-tests-with-temp-file): * test/lisp/progmodes/sql-tests.el (with-sql-test-connect-harness): * test/lisp/saveplace-tests.el (saveplace-test-save-place-to-alist/file) (saveplace-test-forget-unreadable-files) (saveplace-test-place-alist-to-file): * test/lisp/so-long-tests/spelling-tests.el: * test/lisp/textmodes/reftex-tests.el (reftex-locate-bibliography-files) (reftex-parse-from-file-test): * test/lisp/thumbs-tests.el (thumbs-tests-thumbsdir/create-if-missing): * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-bug9726) (vc-bzr-test-bug9781, vc-bzr-test-faulty-bzr-autoloads): * test/lisp/vc/diff-mode-tests.el (diff-mode-test-ignore-trailing-dashes): * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084): * test/lisp/wdired-tests.el (wdired-test-bug32173-01) (wdired-test-bug32173-02, wdired-test-symlink-name) (wdired-test-unfinished-edit-01, wdired-test-bug34915) (wdired-test-bug39280): * test/src/buffer-tests.el (test-kill-buffer-auto-save-default): * test/src/filelock-tests.el (filelock-tests--fixture): * test/src/inotify-tests.el (inotify-file-watch-simple): * test/src/undo-tests.el (undo-test-file-modified): Prefer 'ert-with-temp-(directory|file)' to using 'make-temp-file' directly. In some cases, this is just cleanup, but in several cases this fixes bugs where an error would have lead to us not cleaning up.
* | Replace some macros with ert-with-temp-(file|directory)Stefan Kangas2021-11-064-59/+12
| | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/custom-tests.el (custom-tests--with-temp-dir): * test/lisp/files-tests.el (files-tests--with-temp-file): * test/lisp/progmodes/project-tests.el (project-tests--with-temporary-directory): * test/src/emacs-module-tests.el (module--with-temp-directory): * test/src/emacs-tests.el (emacs-tests--with-temp-file): * test/src/lread-tests.el (lread-tests--with-temp-file): * test/src/process-tests.el (process-tests--with-temp-directory): Replace macros with 'ert-with-temp-(file|directory)'. Update callers.
* | Improve detection of suspicious reordering in source codeEli Zaretskii2021-11-061-1/+21
| | | | | | | | | | | | | | | | | | | | * src/bidi.c (bidi_find_first_overridden): Detect suspiciously reordered EN types as well. * test/src/xdisp-tests.el (xdisp-tests--find-directional-overrides-case-1): Rename from 'xdisp-tests--find-directional-overrides'. (xdisp-tests--find-directional-overrides-case-2): New test.
* | Better detection of potentially malicious bidi textEli Zaretskii2021-11-041-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/bidi.c (bidi_find_first_overridden): Extend to detect more subtle effects of directional formatting controls, to include embeddings and isolates. * src/xdisp.c (Fbidi_find_overridden_directionality): Accept an additional argument BASE-DIR to specify the base direction of the paragraphs. * lisp/international/mule-cmds.el (confusingly-reordered): New face. (reorder-starters, reorder-enders): New variables. (highlight-confusing-reorderings): New command to detect and highlight suspiciously reordered text. * test/src/xdisp-tests.el (xdisp-tests--find-directional-overrides): New test. * etc/NEWS: Announce the new and improved features. * etc/tutorials/TUTORIAL.he: Fix embeddings with incorrect directions.
* | Update keymap-tests after recent changesdickmao2021-11-021-6/+6
| | | | | | | | | | | | | | | | * test/src/keymap-tests.el (help--describe-vector/bug-9293-one-shadowed-in-range): Update tests for d530f3f9ff. (help--describe-vector/bug-9293-same-command-does-not-shadow): Update (bug#51567).
* | Add test for Bug#51527Stefan Kangas2021-10-311-0/+6
| | | | | | | | | | * test/src/keymap-tests.el (keymap-lookup-key/menu-non-symbol): New test.
* | Remove workaround for fixed Bug#6581 from ertStefan Kangas2021-10-311-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/ert.el (ert-equal-including-properties): Make into obsolete function alias for 'equal-including-properties'. * test/src/editfns-tests.el (format-properties): * test/lisp/emacs-lisp/ert-x-tests.el (ert-propertized-string) (ert-test-run-tests-interactively-2): Don't use above obsolete name. (ert--explain-equal-including-properties-rec): New function. (ert--explain-equal-including-properties): Use as an explainer for 'equal-including-properties' now that Bug#6581 is fixed. * test/lisp/emacs-lisp/ert-tests.el (ert-test-explain-equal-string-properties): Expand test. (ert-test-equal-including-properties): Merge test into above expanded test.
* | Fix bug with string values in equal-including-propertiesStefan Kangas2021-10-311-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/intervals.c (intervals_equal_1): Factor out from intervals_equal. Optionally use Fequal for comparison of string values in property lists. (intervals_equal): Update for the above. (compare_string_intervals): Use the above optional Fequal comparison to fix a bug where 'equal-including-properties' compared strings with eq, instead of equal. (Bug#6581) * test/src/fns-tests.el (fns-tests-equal-including-properties) (fns-tests-equal-including-properties/string-prop-vals): New tests. * test/lisp/emacs-lisp/ert-tests.el (ert-test-equal-including-properties): Remove parts testing 'equal-including-properties'. * lisp/emacs-lisp/ert.el (ert-equal-including-properties): Add FIXME that this should be removed.
* | Be more allowing when looking for menu-bar itemsStefan Kangas2021-10-281-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/keymap.c (lookup_key_1): Factor out function from Flookup_key. (Flookup_key): Be case insensitive, and treat spaces as dashes, when looking for Qmenu_bar items. (Bug#50752) * test/src/keymap-tests.el (keymap-lookup-key/mixed-case) (keymap-lookup-key/mixed-case-multibyte) (keymap-lookup-keymap/with-spaces) (keymap-lookup-keymap/with-spaces-multibyte) (keymap-lookup-keymap/with-spaces-multibyte-lang-env): New tests.
* | Add tests for gif to src/image-tests.elStefan Kangas2021-10-241-31/+48
| | | | | | | | | | | | | | | | | | * test/src/image-tests.el (image-tests--images): Rename from image-tests-files. Add gif. (image-tests-image-size/gif) (image-tests-image-mask-p/gif) (image-tests-image-metadata/gif): New tests. * test/data/image/black.gif: New file.
* | Add WebP image format support (Bug#51296)Stefan Kangas2021-10-221-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (--with-webp): New option. (HAVE_WEBP): New variable. (emacs_config_features): Add webp. * src/image.c (enum webp_keyword_index) [HAVE_WEBP]: New enum. (webp_format) [HAVE_WEBP]: New variable. (webp_image_p, init_webp_functions, webp_load) [HAVE_WEBP]: New functions for WebP support. (image_types) [HAVE_WEBP]: Define WebP format. (syms_of_image) <Qwebp> [HAVE_WEBP]: New DEFSYM. Add image type Qwebp. * src/Makefile.in (LIBIMAGE): Add WEBP_LIBS. * lisp/files.el (auto-mode-alist): * lisp/image-file.el (image-file-name-extensions): * lisp/image.el (image-type-header-regexps) (image-type-file-name-regexps, image-type-auto-detectable): Add WebP support. * lisp/term/w32-win.el (dynamic-library-alist): Add the libwebp DLL. * INSTALL: * admin/CPP-DEFINES: * doc/lispref/display.texi (Image Formats, Other Image Types): * nt/INSTALL: Document WebP support. * test/lisp/image-tests.el (image-find-image) (image-type-from-file-name): Expand tests. * test/src/image-tests.el (image-tests--files): Add WebP. (image-tests-image-size/webp, image-tests-image-mask-p/webp) (image-tests-image-metadata/webp): New tests. * test/data/image/black.webp: New file.
* | Merge from origin/emacs-28Glenn Morris2021-10-211-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0545c70c16 (origin/emacs-28) ; * src/keyboard.c (readable_events): Ad... 805ed8d318 Fix todo-mode AOT test failures (bug#51308) 8f42ff31f6 Fix hi-lock AOT test failures (bug#51308) 8002fcd4b9 Fix socks test 4540130312 ; Fix typo 59df93e2dd * lisp/help.el (help--analyze-key): Add new arg BUFFER (bu... cb8b12b56d Improve docstrings and NEWS item of 'repeat-mode' 06fe499614 * lisp/tab-bar.el (tab-bar-menu-bar): New command (bug#512... 8358da9c4c Display a tab bar item as sunken when appropriate 29fdc65860 Fix tab bar item highlight when a mouse click is dropped 7236592668 Refer to mouse-highlight from make-pointer-invisible docst... cf4394a397 * etc/PROBLEMS: Add hex codepoint for NO-BREAK SPACE 2d647e88fa Describe how to debug fontconfig issues c916040921 Adapt Tramp tests 1bb14f93f1 Convert ANSI color definitions in themes to use faces (e.g... 8e7cd29712 Revert "Revert back to using ESC as viper-ESC-key again" 91d71b38a3 Fix inset rectangle corners when sides aren't drawn (bug#5... 5c1a575ef4 Don't use color escape sequences in vc-git-expanded-log-entry d7f595cc89 Code cleanup in tramp-tests.el 548a5db611 ; etc/NEWS fix wording # Conflicts: # etc/NEWS
| * ; Fix typoStefan Kangas2021-10-201-1/+1
| |
* | Add a comment to the Turkish casefiddle testLars Ingebrigtsen2021-10-211-0/+3
| |
* | Add some tests for floatfns.cStefan Kangas2021-10-201-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | * test/src/floatfns-tests.el (floatfns-tests-cos) (floatfns-tests-sin, floatfns-tests-tan, floatfns-tests-isnan) (floatfns-tests-exp, floatfns-tests-expt, floatfns-tests-log) (floatfns-tests-sqrt, floatfns-tests-abs, floatfns-tests-logb) (floatfns-tests-ceiling, floatfns-tests-floor) (floatfns-tests-round, floatfns-tests-truncate) (floatfns-tests-fceiling, floatfns-tests-ffloor) (floatfns-tests-fround, floatfns-tests-ftruncate) (divide-extreme-sign): New tests.
* | Further fixes for Turkish case changes in unibyte stringsLars Ingebrigtsen2021-10-201-0/+13
| | | | | | | | | | | | | | * src/casefiddle.c (struct casing_context): Add new slot to keep track of what the previous operation was. (case_character_impl): Set it. (do_casify_unibyte_string): Use it to handle Turkish correctly.