mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Use new ERT skip-when macro in tests
* test/lisp/autorevert-tests.el (auto-revert-test02-auto-revert-deleted-file): * test/lisp/emacs-lisp/benchmark-tests.el (benchmark-tests): * test/lisp/emacs-lisp/find-func-tests.el (find-func-tests--library-completion): * test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline): * test/lisp/filenotify-tests.el (file-notify-test11-symlinks): * test/lisp/ibuffer-tests.el (ibuffer-0autoload): * test/lisp/international/ucs-normalize-tests.el (ucs-normalize-part1): * test/lisp/net/network-stream-tests.el (echo-server-nowait) (connect-to-tls-ipv4-nowait, connect-to-tls-ipv6-nowait) (open-network-stream-tls-wait, open-network-stream-tls-nowait) (open-network-stream-tls, open-network-stream-tls-nocert) (open-gnutls-stream-new-api-nowait) (open-gnutls-stream-old-api-nowait): * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-10483) (cperl-test-hyperactive-electric-else): * test/lisp/progmodes/elisp-mode-tests.el (eval-last-sexp-print-format-sym-echo) (eval-last-sexp-print-format-small-int-echo) (eval-last-sexp-print-format-large-int-echo) (eval-defun-prints-edebug-when-instrumented): * test/lisp/progmodes/python-tests.el (python-ffap-module-path-1): * test/lisp/shadowfile-tests.el (shadow-test00-clusters) (shadow-test01-sites, shadow-test02-files) (shadow-test03-expand-cluster-in-file-name) (shadow-test04-contract-file-name, shadow-test05-file-match) (shadow-test06-literal-groups, shadow-test07-regexp-groups) (shadow-test08-shadow-todo, shadow-test09-shadow-copy-files): * test/lisp/simple-tests.el (eval-expression-print-format-sym-echo) (eval-expression-print-format-small-int-echo) (eval-expression-print-format-large-int-echo): * test/lisp/term-tests.el (term-simple-lines) (term-carriage-return, term-line-wrap, term-colors) (term-colors-bold-is-bright, term-cursor-movement) (term-scrolling-region, term-set-directory) (term-line-wrapping-then-motion, term-to-margin): * test/lisp/thread-tests.el (thread-tests-list-threads-error-when-not-configured): * test/lisp/vc/vc-tests.el (backend): * test/manual/scroll-tests.el (scroll-tests-scroll-margin-0) (scroll-tests-scroll-margin-negative) (scroll-tests-scroll-margin-max) (scroll-tests-scroll-margin-over-max) (scroll-tests-scroll-margin-whole-window): * test/misc/test-custom-libs.el (test-custom-libs): * test/src/emacs-module-tests.el (module/async-pipe): * test/src/fileio-tests.el (fileio-tests--odd-symlink-chars): * test/src/filelock-tests.el (filelock-tests-lock-spoiled) (filelock-tests-file-locked-p-spoiled) (filelock-tests-unlock-spoiled) (filelock-tests-kill-buffer-spoiled) (filelock-tests-detect-external-change): * test/src/image-tests.el (image-tests-image-size/error-on-nongraphical-display) (image-tests-image-mask-p/error-on-nongraphical-display) (image-tests-image-metadata/error-on-nongraphical-display): * test/src/process-tests.el (make-process/mix-stderr) (process-tests/fd-setsize-no-crash/make-network-process) (process-tests/fd-setsize-no-crash/make-serial-process): Use ERT `skip-when` macro in tests.
This commit is contained in:
parent
62f7760e61
commit
7975c811d3
23 changed files with 72 additions and 72 deletions
|
|
@ -110,7 +110,7 @@
|
|||
(buffer-substring (point-min) (point-max))))))
|
||||
|
||||
(ert-deftest term-simple-lines ()
|
||||
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
|
||||
(skip-when (memq system-type '(windows-nt ms-dos)))
|
||||
(let ((str "\
|
||||
first line\r
|
||||
next line\r\n"))
|
||||
|
|
@ -118,14 +118,14 @@ next line\r\n"))
|
|||
(string-replace "\r" "" str)))))
|
||||
|
||||
(ert-deftest term-carriage-return ()
|
||||
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
|
||||
(skip-when (memq system-type '(windows-nt ms-dos)))
|
||||
(let ((str "\
|
||||
first line\r_next line\r\n"))
|
||||
(should (equal (term-test-screen-from-input 40 12 str)
|
||||
"_next line\n"))))
|
||||
|
||||
(ert-deftest term-line-wrap ()
|
||||
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
|
||||
(skip-when (memq system-type '(windows-nt ms-dos)))
|
||||
(should (string-match-p
|
||||
;; Don't be strict about trailing whitespace.
|
||||
"\\`a\\{40\\}\na\\{20\\} *\\'"
|
||||
|
|
@ -137,7 +137,7 @@ first line\r_next line\r\n"))
|
|||
(list str str))))))
|
||||
|
||||
(ert-deftest term-colors ()
|
||||
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
|
||||
(skip-when (memq system-type '(windows-nt ms-dos)))
|
||||
(pcase-dolist (`(,str ,expected) ansi-test-strings)
|
||||
(let ((result (term-test-screen-from-input 40 12 str)))
|
||||
(should (equal result expected))
|
||||
|
|
@ -145,7 +145,7 @@ first line\r_next line\r\n"))
|
|||
(text-properties-at 0 expected))))))
|
||||
|
||||
(ert-deftest term-colors-bold-is-bright ()
|
||||
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
|
||||
(skip-when (memq system-type '(windows-nt ms-dos)))
|
||||
(let ((ansi-color-bold-is-bright t))
|
||||
(pcase-dolist (`(,str ,expected ,bright-expected) ansi-test-strings)
|
||||
(let ((expected (or bright-expected expected))
|
||||
|
|
@ -155,7 +155,7 @@ first line\r_next line\r\n"))
|
|||
(text-properties-at 0 expected)))))))
|
||||
|
||||
(ert-deftest term-cursor-movement ()
|
||||
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
|
||||
(skip-when (memq system-type '(windows-nt ms-dos)))
|
||||
;; Absolute positioning.
|
||||
(should (equal "ab\ncd"
|
||||
(term-test-screen-from-input
|
||||
|
|
@ -186,7 +186,7 @@ first line\r_next line\r\n"))
|
|||
"\e[D\e[Da")))))
|
||||
|
||||
(ert-deftest term-scrolling-region ()
|
||||
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
|
||||
(skip-when (memq system-type '(windows-nt ms-dos)))
|
||||
(should (equal "\
|
||||
line3
|
||||
line4
|
||||
|
|
@ -338,7 +338,7 @@ line6\r
|
|||
line7")))))
|
||||
|
||||
(ert-deftest term-set-directory ()
|
||||
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
|
||||
(skip-when (memq system-type '(windows-nt ms-dos)))
|
||||
(let ((term-ansi-at-user (user-real-login-name)))
|
||||
(should (equal (term-test-screen-from-input
|
||||
40 12 "\eAnSiTc /foo/\n" 'default-directory)
|
||||
|
|
@ -354,7 +354,7 @@ A real-life example is the default zsh prompt which writes spaces
|
|||
to the end of line (triggering line-wrapping state), and then
|
||||
sends a carriage return followed by another space to overwrite
|
||||
the first character of the line."
|
||||
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
|
||||
(skip-when (memq system-type '(windows-nt ms-dos)))
|
||||
(let* ((width 10)
|
||||
(strs (list "x" (make-string (1- width) ?_)
|
||||
"\r_")))
|
||||
|
|
@ -364,7 +364,7 @@ the first character of the line."
|
|||
(ert-deftest term-to-margin ()
|
||||
"Test cursor movement at the scroll margin.
|
||||
This is a reduced example from GNU nano's initial screen."
|
||||
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
|
||||
(skip-when (memq system-type '(windows-nt ms-dos)))
|
||||
(let* ((width 10)
|
||||
(x (make-string width ?x))
|
||||
(y (make-string width ?y)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue