diff options
author | Noam Postavsky <npostavs@gmail.com> | 2018-06-10 18:47:27 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2018-06-10 18:47:27 -0400 |
commit | 962547791e6ea16b18512e6b933a5317c464da26 (patch) | |
tree | 87fc820012905ecdca864ec3722c222a82e331d9 /test/lisp/term-tests.el | |
parent | eaeb69c59c3df6d33a865356973018b24265d120 (diff) | |
parent | 8a1576cc03963138d62c42bd373226e58f9f17c6 (diff) | |
download | emacs-962547791e6ea16b18512e6b933a5317c464da26.tar.gz emacs-962547791e6ea16b18512e6b933a5317c464da26.tar.bz2 emacs-962547791e6ea16b18512e6b933a5317c464da26.zip |
Merge from emacs-26
8a1576cc03 Fix term.el cursor movement at bottom margin (Bug#31690)
Diffstat (limited to 'test/lisp/term-tests.el')
-rw-r--r-- | test/lisp/term-tests.el | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/lisp/term-tests.el b/test/lisp/term-tests.el index 72a9ad1ef74..ebf48d50a84 100644 --- a/test/lisp/term-tests.el +++ b/test/lisp/term-tests.el @@ -143,6 +143,26 @@ the first character of the line." (should (equal (term-test-screen-from-input width 12 strs) (make-string width ?_))))) +(ert-deftest term-to-margin () + "Test cursor movement at the scroll margin. +This is a reduced example from GNU nano's initial screen." + (let* ((width 10) + (x (make-string width ?x)) + (y (make-string width ?y))) + (should (equal (term-test-screen-from-input + width 3 + `("\e[1;3r" ; Setup 3 line scrolling region. + "\e[2;1H" ; Move to 2nd last line. + ,x ; Fill with 'x'. + "\r\e[1B" ; Next line. + ,y)) ; Fill with 'y'. + (concat "\n" x "\n" y))) + ;; Same idea, but moving upwards. + (should (equal (term-test-screen-from-input + width 3 + `("\e[1;3r" "\e[2;1H" ,x "\r\e[1A" ,y)) + (concat y "\n" x))))) + (provide 'term-tests) ;;; term-tests.el ends here |