Add test: ein:notebook-goto-prev-cell-simple

This commit is contained in:
Takafumi Arakaki 2012-05-16 12:35:30 +02:00
parent 43e33dc947
commit b7c5dd4996

View file

@ -163,6 +163,19 @@
do (ein:notebook-goto-next-cell)
do (should (looking-at (format "Cell %s" (1+ i)))))))
(ert-deftest ein:notebook-goto-prev-cell-simple ()
(with-current-buffer (eintest:notebook-make-empty)
(loop for i from 0 below 3
do (ein:notebook-insert-cell-below-command)
do (insert (format "Cell %s" i)))
(should (equal (ein:notebook-ncells ein:notebook) 3))
;; (message "%s" (buffer-string))
(loop for i downfrom 2 to 1
do (beginning-of-line) ; This is required, I need to check why
do (should (looking-at (format "Cell %s" i)))
do (ein:notebook-goto-prev-cell)
do (should (looking-at (format "Cell %s" (1- i)))))))
;; Misc unit tests