Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

This commit is contained in:
Eli Zaretskii 2023-08-14 18:10:00 +03:00
commit ef3c410018
6 changed files with 418 additions and 777 deletions

File diff suppressed because it is too large Load diff

View file

@ -237,7 +237,9 @@ in batch mode, an error is signaled.
`(:expected-result-type ,expected-result))
,@(when tags-supplied-p
`(:tags ,tags))
:body (lambda () ,@body)
;; Add `nil' after the body to enable compiler warnings
;; about unused computations at the end.
:body (lambda () ,@body nil)
:file-name ,(or (macroexp-file-name) buffer-file-name)))
',name))))

View file

@ -698,8 +698,8 @@ An existing calc stack is reused, otherwise a new one is created."
(calc-tests--not x w)))
(dolist (n '(0 1 4 16 32 -1 -4 -16 -32))
(equal (calcFunc-clip x n)
(calc-tests--clip x n)))
(should (equal (calcFunc-clip x n)
(calc-tests--clip x n))))
(dolist (y '(0 1 #x1234 #x8000 #xabcd #xffff
#x12345678 #xabcdef12 #x80000000 #xffffffff

View file

@ -241,12 +241,12 @@
(let ((buffers (find-file (concat (file-name-as-directory test-dir)
"*")
t)))
(setq allbufs (append buffers allbufs))
(dolist (buf buffers)
(let ((pt (with-current-buffer buf (point))))
(switch-to-buffer (find-file-noselect test-dir))
(find-file (buffer-name buf))
(should (equal (point) pt))))
(append buffers allbufs)))
(should (equal (point) pt))))))
(dolist (buf allbufs)
(when (buffer-live-p buf) (kill-buffer buf)))))))

View file

@ -1204,30 +1204,30 @@ unquoted file names."
(let ((process-environment (cons "FOO=foo" process-environment))
(nospecial-foo (files-tests--new-name nospecial "$FOO")))
;; The "/:" prevents substitution.
(equal (substitute-in-file-name nospecial-foo) nospecial-foo)))
(should (equal (substitute-in-file-name nospecial-foo) nospecial-foo))))
(files-tests--with-temp-non-special-and-file-name-handler (tmpfile nospecial)
(let ((process-environment (cons "FOO=foo" process-environment))
(nospecial-foo (files-tests--new-name nospecial "$FOO")))
;; The "/:" prevents substitution.
(equal (substitute-in-file-name nospecial-foo) nospecial-foo))))
(should (equal (substitute-in-file-name nospecial-foo) nospecial-foo)))))
(ert-deftest files-tests-file-name-non-special-temporary-file-directory ()
(files-tests--with-temp-non-special (tmpdir nospecial-dir t)
(let ((default-directory nospecial-dir))
(equal (temporary-file-directory) temporary-file-directory)))
(should (equal (temporary-file-directory) temporary-file-directory))))
(files-tests--with-temp-non-special-and-file-name-handler
(tmpdir nospecial-dir t)
(let ((default-directory nospecial-dir))
(equal (temporary-file-directory) temporary-file-directory))))
(should (equal (temporary-file-directory) temporary-file-directory)))))
(ert-deftest files-tests-file-name-non-special-unhandled-file-name-directory ()
(files-tests--with-temp-non-special (tmpdir nospecial-dir t)
(equal (unhandled-file-name-directory nospecial-dir)
(file-name-as-directory tmpdir)))
(should (equal (unhandled-file-name-directory nospecial-dir)
(file-name-as-directory tmpdir))))
(files-tests--with-temp-non-special-and-file-name-handler
(tmpdir nospecial-dir t)
(equal (unhandled-file-name-directory nospecial-dir)
(file-name-as-directory tmpdir))))
(should (equal (unhandled-file-name-directory nospecial-dir)
(file-name-as-directory tmpdir)))))
(ert-deftest files-tests-file-name-non-special-vc-registered ()
(files-tests--with-temp-non-special (tmpfile nospecial)

View file

@ -518,7 +518,6 @@ the `parse-partial-sexp's are expected to stop. See
(modify-syntax-entry (unibyte-char-to-multibyte 128) "_" st)
(set-syntax-table st)
(should (equal (eval '(char-syntax 128) t) ?_))
(should (equal (funcall cs 128) ?_))))
(list (char-syntax 128) (funcall cs 128))))
(should (equal (funcall cs 128) ?_))))))
;;; syntax-tests.el ends here