diff options
| author | K. Handa | 2016-06-01 09:16:32 +0900 |
|---|---|---|
| committer | K. Handa | 2016-06-01 09:16:32 +0900 |
| commit | 8e22067d59f59ee3a39f5d4f95c27e8ea3c935d6 (patch) | |
| tree | 98c0480e0765c4f2b3d24ff5a1617e64a9109d80 /test | |
| parent | 6d66089127313a1c5b5c5584eaf3e9edec010955 (diff) | |
| parent | 25cc0f2aada3e321e5f1c6d1e492a93d16da45b2 (diff) | |
| download | emacs-8e22067d59f59ee3a39f5d4f95c27e8ea3c935d6.tar.gz emacs-8e22067d59f59ee3a39f5d4f95c27e8ea3c935d6.zip | |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/emulation/viper-tests.el | 10 | ||||
| -rw-r--r-- | test/lisp/subr-tests.el | 9 |
2 files changed, 14 insertions, 5 deletions
diff --git a/test/lisp/emulation/viper-tests.el b/test/lisp/emulation/viper-tests.el index 8b30f050935..e2c39b3c3de 100644 --- a/test/lisp/emulation/viper-tests.el +++ b/test/lisp/emulation/viper-tests.el | |||
| @@ -33,7 +33,7 @@ after itself, although it will leave a buffer called | |||
| 33 | (let ( | 33 | (let ( |
| 34 | ;; Viper just turns itself off during batch use. | 34 | ;; Viper just turns itself off during batch use. |
| 35 | (noninteractive nil) | 35 | (noninteractive nil) |
| 36 | ;; Switch off start up message or it will chew the key presses | 36 | ;; Switch off start up message or it will chew the key presses. |
| 37 | (viper-inhibit-startup-message 't) | 37 | (viper-inhibit-startup-message 't) |
| 38 | ;; Select an expert-level for the same reason. | 38 | ;; Select an expert-level for the same reason. |
| 39 | (viper-expert-level 5) | 39 | (viper-expert-level 5) |
| @@ -42,7 +42,7 @@ after itself, although it will leave a buffer called | |||
| 42 | (before-buffer (current-buffer))) | 42 | (before-buffer (current-buffer))) |
| 43 | (unwind-protect | 43 | (unwind-protect |
| 44 | (progn | 44 | (progn |
| 45 | ;; viper-mode is essentially global, so set it here | 45 | ;; viper-mode is essentially global, so set it here. |
| 46 | (viper-mode) | 46 | (viper-mode) |
| 47 | ;; We must switch to buffer because we are using a keyboard macro | 47 | ;; We must switch to buffer because we are using a keyboard macro |
| 48 | ;; which appears to not go to the current-buffer but what ever is | 48 | ;; which appears to not go to the current-buffer but what ever is |
| @@ -54,16 +54,16 @@ after itself, although it will leave a buffer called | |||
| 54 | (erase-buffer) | 54 | (erase-buffer) |
| 55 | ;; The new buffer fails to enter vi state so set it. | 55 | ;; The new buffer fails to enter vi state so set it. |
| 56 | (viper-change-state-to-vi) | 56 | (viper-change-state-to-vi) |
| 57 | ;; Run the macro | 57 | ;; Run the macro. |
| 58 | (execute-kbd-macro kmacro) | 58 | (execute-kbd-macro kmacro) |
| 59 | (let ((rtn | 59 | (let ((rtn |
| 60 | (buffer-substring-no-properties | 60 | (buffer-substring-no-properties |
| 61 | (point-min) | 61 | (point-min) |
| 62 | (point-max)))) | 62 | (point-max)))) |
| 63 | ;; Kill the buffer iff the macro succeeds | 63 | ;; Kill the buffer iff the macro succeeds. |
| 64 | (kill-buffer) | 64 | (kill-buffer) |
| 65 | rtn)) | 65 | rtn)) |
| 66 | ;; switch everthing off and restore the buffer | 66 | ;; Switch everything off and restore the buffer. |
| 67 | (toggle-viper-mode) | 67 | (toggle-viper-mode) |
| 68 | (switch-to-buffer before-buffer)))) | 68 | (switch-to-buffer before-buffer)))) |
| 69 | 69 | ||
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 7906a207a96..ce212903c9d 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el | |||
| @@ -61,6 +61,15 @@ | |||
| 61 | (quote | 61 | (quote |
| 62 | (0 font-lock-keyword-face)))))))) | 62 | (0 font-lock-keyword-face)))))))) |
| 63 | 63 | ||
| 64 | (ert-deftest number-sequence-test () | ||
| 65 | (should (= (length | ||
| 66 | (number-sequence (1- most-positive-fixnum) most-positive-fixnum)) | ||
| 67 | 2)) | ||
| 68 | (should (= (length | ||
| 69 | (number-sequence | ||
| 70 | (1+ most-negative-fixnum) most-negative-fixnum -1)) | ||
| 71 | 2))) | ||
| 72 | |||
| 64 | (ert-deftest string-comparison-test () | 73 | (ert-deftest string-comparison-test () |
| 65 | (should (string-lessp "abc" "acb")) | 74 | (should (string-lessp "abc" "acb")) |
| 66 | (should (string-lessp "aBc" "abc")) | 75 | (should (string-lessp "aBc" "abc")) |