diff options
| author | Eli Zaretskii | 2019-06-07 12:01:11 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2019-06-07 12:01:11 +0300 |
| commit | e5bc9a32b65e16ff48a50d56e3d8b4990e95acac (patch) | |
| tree | 81f87bcdc75b672571f8eaaf110c9d651e04fe1a | |
| parent | ad9eadbe4ab9811d5b4091a18d7a09d325e75fb3 (diff) | |
| download | emacs-e5bc9a32b65e16ff48a50d56e3d8b4990e95acac.tar.gz emacs-e5bc9a32b65e16ff48a50d56e3d8b4990e95acac.zip | |
Fix failures of term-tests on MS-Widows
* test/lisp/term-tests.el (term-simple-lines)
(term-carriage-return, term-line-wrap, term-cursor-movement)
(term-scrolling-region, term-set-directory)
(term-line-wrapping-then-motion, term-to-margin): Skip tests
on MS-Windows and MS-DOS.
| -rw-r--r-- | test/lisp/term-tests.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lisp/term-tests.el b/test/lisp/term-tests.el index 6923096d224..33ed006cf8b 100644 --- a/test/lisp/term-tests.el +++ b/test/lisp/term-tests.el | |||
| @@ -51,6 +51,7 @@ | |||
| 51 | (buffer-substring-no-properties (point-min) (point-max)))))) | 51 | (buffer-substring-no-properties (point-min) (point-max)))))) |
| 52 | 52 | ||
| 53 | (ert-deftest term-simple-lines () | 53 | (ert-deftest term-simple-lines () |
| 54 | (skip-unless (not (memq system-type '(windows-nt ms-dos)))) | ||
| 54 | (let ((str "\ | 55 | (let ((str "\ |
| 55 | first line\r | 56 | first line\r |
| 56 | next line\r\n")) | 57 | next line\r\n")) |
| @@ -58,12 +59,14 @@ next line\r\n")) | |||
| 58 | (replace-regexp-in-string "\r" "" str))))) | 59 | (replace-regexp-in-string "\r" "" str))))) |
| 59 | 60 | ||
| 60 | (ert-deftest term-carriage-return () | 61 | (ert-deftest term-carriage-return () |
| 62 | (skip-unless (not (memq system-type '(windows-nt ms-dos)))) | ||
| 61 | (let ((str "\ | 63 | (let ((str "\ |
| 62 | first line\r_next line\r\n")) | 64 | first line\r_next line\r\n")) |
| 63 | (should (equal (term-test-screen-from-input 40 12 str) | 65 | (should (equal (term-test-screen-from-input 40 12 str) |
| 64 | "_next line\n")))) | 66 | "_next line\n")))) |
| 65 | 67 | ||
| 66 | (ert-deftest term-line-wrap () | 68 | (ert-deftest term-line-wrap () |
| 69 | (skip-unless (not (memq system-type '(windows-nt ms-dos)))) | ||
| 67 | (should (string-match-p | 70 | (should (string-match-p |
| 68 | ;; Don't be strict about trailing whitespace. | 71 | ;; Don't be strict about trailing whitespace. |
| 69 | "\\`a\\{40\\}\na\\{20\\} *\\'" | 72 | "\\`a\\{40\\}\na\\{20\\} *\\'" |
| @@ -75,6 +78,7 @@ first line\r_next line\r\n")) | |||
| 75 | (list str str)))))) | 78 | (list str str)))))) |
| 76 | 79 | ||
| 77 | (ert-deftest term-cursor-movement () | 80 | (ert-deftest term-cursor-movement () |
| 81 | (skip-unless (not (memq system-type '(windows-nt ms-dos)))) | ||
| 78 | ;; Absolute positioning. | 82 | ;; Absolute positioning. |
| 79 | (should (equal "ab\ncd" | 83 | (should (equal "ab\ncd" |
| 80 | (term-test-screen-from-input | 84 | (term-test-screen-from-input |
| @@ -105,6 +109,7 @@ first line\r_next line\r\n")) | |||
| 105 | "\e[D\e[Da"))))) | 109 | "\e[D\e[Da"))))) |
| 106 | 110 | ||
| 107 | (ert-deftest term-scrolling-region () | 111 | (ert-deftest term-scrolling-region () |
| 112 | (skip-unless (not (memq system-type '(windows-nt ms-dos)))) | ||
| 108 | (should (equal "\ | 113 | (should (equal "\ |
| 109 | line3 | 114 | line3 |
| 110 | line4 | 115 | line4 |
| @@ -256,6 +261,7 @@ line6\r | |||
| 256 | line7"))))) | 261 | line7"))))) |
| 257 | 262 | ||
| 258 | (ert-deftest term-set-directory () | 263 | (ert-deftest term-set-directory () |
| 264 | (skip-unless (not (memq system-type '(windows-nt ms-dos)))) | ||
| 259 | (let ((term-ansi-at-user (user-real-login-name))) | 265 | (let ((term-ansi-at-user (user-real-login-name))) |
| 260 | (should (equal (term-test-screen-from-input | 266 | (should (equal (term-test-screen-from-input |
| 261 | 40 12 "\eAnSiTc /foo/\n" 'default-directory) | 267 | 40 12 "\eAnSiTc /foo/\n" 'default-directory) |
| @@ -271,6 +277,7 @@ A real-life example is the default zsh prompt which writes spaces | |||
| 271 | to the end of line (triggering line-wrapping state), and then | 277 | to the end of line (triggering line-wrapping state), and then |
| 272 | sends a carriage return followed by another space to overwrite | 278 | sends a carriage return followed by another space to overwrite |
| 273 | the first character of the line." | 279 | the first character of the line." |
| 280 | (skip-unless (not (memq system-type '(windows-nt ms-dos)))) | ||
| 274 | (let* ((width 10) | 281 | (let* ((width 10) |
| 275 | (strs (list "x" (make-string (1- width) ?_) | 282 | (strs (list "x" (make-string (1- width) ?_) |
| 276 | "\r_"))) | 283 | "\r_"))) |
| @@ -280,6 +287,7 @@ the first character of the line." | |||
| 280 | (ert-deftest term-to-margin () | 287 | (ert-deftest term-to-margin () |
| 281 | "Test cursor movement at the scroll margin. | 288 | "Test cursor movement at the scroll margin. |
| 282 | This is a reduced example from GNU nano's initial screen." | 289 | This is a reduced example from GNU nano's initial screen." |
| 290 | (skip-unless (not (memq system-type '(windows-nt ms-dos)))) | ||
| 283 | (let* ((width 10) | 291 | (let* ((width 10) |
| 284 | (x (make-string width ?x)) | 292 | (x (make-string width ?x)) |
| 285 | (y (make-string width ?y))) | 293 | (y (make-string width ?y))) |