Skip to content

Commit

Permalink
Merge pull request #1062 from fukamachi/fix/vi-register-tests
Browse files Browse the repository at this point in the history
Fix vi-mode register tests to get along with changes of #1055
  • Loading branch information
cxxxr authored Sep 5, 2023
2 parents 6a1e39d + 6b77eff commit f733484
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 f733484

Please sign in to comment.