From 0970207a23b08dcb4eb4b50e5070223475ae9e5a Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Wed, 16 May 2012 11:48:54 +0200 Subject: [PATCH] Add test: ein:notebook-delete-cell-command-simple --- tests/test-ein-notebook.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test-ein-notebook.el b/tests/test-ein-notebook.el index b67057d..89e5e4e 100644 --- a/tests/test-ein-notebook.el +++ b/tests/test-ein-notebook.el @@ -96,6 +96,17 @@ (ein:notebook-insert-cell-above-command) (should (equal (ein:notebook-ncells ein:notebook) 3)))) +(ert-deftest ein:notebook-delete-cell-command-simple () + (with-current-buffer (eintest:notebook-make-empty) + (loop repeat 3 + do (ein:notebook-insert-cell-above-command)) + (should (equal (ein:notebook-ncells ein:notebook) 3)) + (loop repeat 3 + do (ein:notebook-delete-cell-command)) + (should (equal (ein:notebook-ncells ein:notebook) 0)))) + + +;; Misc unit tests (ert-deftest ein:notebook-test-notebook-name-simple () (should-not (ein:notebook-test-notebook-name nil))