Skip to content

Commit

Permalink
Add predicate that determines if the session is saved automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescherti committed Aug 17, 2024
1 parent fa72105 commit 26c8977
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/test-easysession.el
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 26c8977

Please sign in to comment.