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:       (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
  
negative.code:       (is-true (nvim:buffer-valid-p b))
        (nvim:command "bw!")
        (is-false (nvim:buffer-valid-p b)))))
  
  (test buffers
    (with-fixture cleanup ()
      (let* ((b (nvim:current-buffer))
             (n (nvim:buffer-number b)))
        (is (= 1 (length (nvim:buffers))))
        (dotimes (i 5)
          (nvim:command "new"))
        (is (= 6 (length (nvim:buffers))))
        (is-true (find n (nvim:buffers) :key #'nvim:buffer-number))
        (setf (nvim:current-buffer) b)
        (is (= n (nvim:buffer-number (nvim:current-buffer))))
        (nvim:command "bw!")
        (is (= 5 (length (nvim:buffers))))
        (is-false (find n (nvim:buffers) :key #'nvim:buffer-number)))))
  
  (test line
    (with-fixture cleanup ()
      (let ((b (nvim:current-buffer)))
        (is (equal '("") (nvim:buffer-lines b 0 -1 T)))
        (setf (nvim:buffer-lines b 0 -1 T) '("abc" "def" "ghi"))
        (setf (nvim:buffer-line b 1) "DEF")
        (is (string= "abc" (nvim:buffer-line b 0)))
        (is (string= "DEF" (nvim:buffer-line b 1)))
        (is (string= "ghi" (nvim:buffer-line b 2)))
        (signals error (nvim:buffer-line b 5))
        (nvim:buffer-del-line b 0)
        (is (equal '("DEF" "ghi") (nvim:buffer-lines b 0 -1 T)))
        (nvim:buffer-del-line b 1)
        (is (equal '("DEF") (nvim:buffer-lines b 0 -1 T)))
        (is (string= "DEF" (nvim:buffer-line b 0)))
        (nvim:buffer-del-line b 0)
        (nvim:buffer-del-line b 0)
        (is (equal '("") (nvim:buffer-lines b 0 -1 T))))))
  
  (test lines
    (with-fixture cleanup ()
  