From 26c897763f17b108bfca2251eac5db997e6c2711 Mon Sep 17 00:00:00 2001 From: James Cherti <60946298+jamescherti@users.noreply.github.com> Date: Sat, 17 Aug 2024 17:04:48 -0400 Subject: [PATCH] Add predicate that determines if the session is saved automatically --- tests/test-easysession.el | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/test-easysession.el b/tests/test-easysession.el index 0a31984..636daa8 100644 --- a/tests/test-easysession.el +++ b/tests/test-easysession.el @@ -253,8 +253,16 @@ storing them in respective variables for later use." (unless (string= (expand-file-name test-easysession--dired-buffer-path) (expand-file-name default-directory)) (error - "The Dired buffer points to the wrong path"))) + "The Dired buffer points to the wrong path")))) +(defun test-easysession--get-all-names () + "Test: `easysession--get-all-names'." + (interactive) + (unless (equal (easysession--get-all-names) '("main" "test")) + (error "The easysession--get-all-names failed"))) + +(defun test-save-mode-predicate () + (interactive) ;; Test save-mode predicate (defun my-easysession-nothing-saved () "Nothing is saved." @@ -275,12 +283,6 @@ storing them in respective variables for later use." "easysession-save-mode-predicate does not seem to " "be working")))) -(defun test-easysession--get-all-names () - "Test: `easysession--get-all-names'." - (interactive) - (unless (equal (easysession--get-all-names) '("main" "test")) - (error "The easysession--get-all-names failed"))) - (defun test-easysession () "Test easysession." (interactive) @@ -290,6 +292,7 @@ storing them in respective variables for later use." (test-easysession--create-buffers) (test-easysession--save-load) (test-easysession--get-all-names) + (message "Success: test-easysession")) (provide 'test-easysession)