Skip to content

Commit

Permalink
Fix vi-mode register tests to get along with changes of lem-project#1055
Browse files Browse the repository at this point in the history
  • Loading branch information
fukamachi committed Sep 5, 2023
1 parent 6a1e39d commit 6b77eff
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions extensions/vi-mode/tests/registers.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -63,37 +63,37 @@
(with-fake-interface ()
(with-vi-buffer (#?"[a]bc\ndef\nghi\njkl\n")
(cmd "yy")
(ok (equal (yank-text (get-numbered-register #\0)) "abc"))
(ok (equal (yank-text (get-numbered-register #\0)) #?"abc\n"))
(ok (equal (yank-type (get-numbered-register #\0)) :line))
(ok (eql *unnamed-register* #\0))
(cmd "jdd")
(ok (equal (yank-text (get-numbered-register #\0)) "abc"))
(ok (equal (yank-text (get-numbered-register #\1)) "def"))
(ok (equal (yank-text (get-numbered-register #\0)) #?"abc\n"))
(ok (equal (yank-text (get-numbered-register #\1)) #?"def\n"))
(ok (eql *unnamed-register* #\1))
(cmd "dl")
(ok (equal (yank-text (get-numbered-register #\0)) "abc"))
(ok (equal (yank-text (get-numbered-register #\1)) "def"))
(ok (equal (yank-text (get-numbered-register #\0)) #?"abc\n"))
(ok (equal (yank-text (get-numbered-register #\1)) #?"def\n"))
(ok (equal (yank-text *small-deletion-register*) "g"))
(ok (eql *unnamed-register* #\-))
(cmd "dd")
(ok (equal (yank-text (get-numbered-register #\0)) "abc"))
(ok (equal (yank-text (get-numbered-register #\1)) "hi"))
(ok (equal (yank-text (get-numbered-register #\2)) "def"))
(ok (equal (yank-text (get-numbered-register #\0)) #?"abc\n"))
(ok (equal (yank-text (get-numbered-register #\1)) #?"hi\n"))
(ok (equal (yank-text (get-numbered-register #\2)) #?"def\n"))
(ok (eql *unnamed-register* #\1))
(cmd "yl")
(ok (equal (yank-text (get-numbered-register #\0)) "j"))
(ok (equal (yank-text (get-numbered-register #\1)) "hi"))
(ok (equal (yank-text (get-numbered-register #\2)) "def"))
(ok (equal (yank-text (get-numbered-register #\1)) #?"hi\n"))
(ok (equal (yank-text (get-numbered-register #\2)) #?"def\n"))
(ok (eql *unnamed-register* #\0)))))

(deftest register
(with-fake-interface ()
(with-vi-buffer (#?"[a]bc\ndef\nghi\njkl\n")
(cmd "yy")
(ok (equal (multiple-value-list (register #\0))
'("abc" :line)))
'(#?"abc\n" :line)))
(ok (equal (multiple-value-list (register #\"))
'("abc" :line)))
'(#?"abc\n" :line)))
(cmd "dl")
(ok (equal (multiple-value-list (register #\-))
'("a" :char)))
Expand Down

0 comments on commit 6b77eff

Please sign in to comment.