anchor.diff:        (nvim:command "silent w!")
         (is-true (probe-file new-name)))))
   
  +(test current-buffer
  +  (with-fixture cleanup ()
  +    (let ((b1 (nvim:current-buffer)))
  +      ; to test with eql we would have to fix cl-messagepack
  +      (is (= (nvim:buffer-number (nvim:current-buffer)) (nvim:buffer-number b1)))
  +      (nvim:command "new")
  +      (is (/= (nvim:buffer-number (nvim:current-buffer)) (nvim:buffer-number b1)))
  +      (let ((b2 (nvim:current-buffer)))
  +        (is (= (nvim:buffer-number (nvim:current-buffer)) (nvim:buffer-number b2)))
  +        (is (/= (nvim:buffer-number b2) (nvim:buffer-number b1)))
  +        (setf (nvim:current-buffer) b1)
  +        (is (= (nvim:buffer-number (nvim:current-buffer)) (nvim:buffer-number b1)))
  +        (setf (nvim:current-buffer) b2)
  +        (is (= (nvim:buffer-number (nvim:current-buffer)) (nvim:buffer-number b2)))))))
  +
   (test valid
     (with-fixture cleanup ()
       (nvim:command "new")
  
positive.code:       (is (equal '("b" "a" "") (nvim:buffer-lines b 0 -1 T)))
        (alexandria:appendf (nvim:buffer-lines b 0 -1 T) '("c"))
        (is (equal '("b" "a" "" "c") (nvim:buffer-lines b 0 -1 T)))
        (nvim:buffer-del-line b 2)
        (is (equal '("b" "a" "c") (nvim:buffer-lines b 0 -1 T)))
        (nvim:buffer-del-line b 0)
        (is (equal '("a" "c") (nvim:buffer-lines b 0 -1 T)))
        (nvim:buffer-insert b 1 '("i" "m"))
        (is (equal '("a" "i" "m" "c") (nvim:buffer-lines b 0 -1 T)))
        (dotimes (i 5)
          (nvim:buffer-del-line b 0))
        (is (equal '("") (nvim:buffer-lines b 0 -1 T)))
        (setf (nvim:buffer-lines b 0 -1 T) '("abc" "def" "ghi"))
        (is (equal '("abc" "def" "ghi") (nvim:buffer-lines b 0 -1 T)))   
        (setf (nvim:buffer-lines b 0 -1 T) '("s"))
        (is (equal '("s") (nvim:buffer-lines b 0 -1 T))))))
  
  (test count
    (with-fixture cleanup ()
      (let ((b (nvim:current-buffer)))
        (setf (nvim:buffer-lines b 0 -1 T) '("a" "b" "c" "d"))
        (is (= 4 (length (nvim:buffer-lines b 0 -1 T)))) 
        (is (= 4 (nvim:buffer-line-count b))))))
  
  (test marks
  
negative.code:       (setf (nvim:buffer-option b "shiftwidth") 4)
        (is (equal 4 (nvim:buffer-option b "shiftwidth")))
        (setf (nvim:buffer-option b "define") "test")
        (is (equal "test" (nvim:buffer-option b "define")))
        (is (equal "^\\s*#\\s*define" (nvim:option "define"))))))
  
  (test number
  