diff --git a/tests/test-ein-notebook.el b/tests/test-ein-notebook.el index a2aa91f..7c818cc 100644 --- a/tests/test-ein-notebook.el +++ b/tests/test-ein-notebook.el @@ -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