Skip to content

Commit

Permalink
Whitespace fixes for ekg-test.el
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyatt committed Jul 16, 2024
1 parent 321ba9a commit a7aa2f7
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions ekg-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,21 @@
(let* ((note (ekg-note-create :text "" :mode 'text-mode :tags '("a" "b")))
(note-buf (ekg-edit note)))
(unwind-protect
(progn
;; Can we store a link?
(with-current-buffer note-buf
(org-store-link nil 1)
(should (car org-stored-links)))
(with-temp-buffer
;; Does the link look correct?
(org-mode)
(org-insert-last-stored-link nil)
(should (string= (buffer-string) (format "[[ekg-note:%d][EKG note: %d]]\n" (ekg-note-id note) (ekg-note-id note))))
;; Does the link work?
(goto-char 1)
(org-open-at-point nil)
(should (eq note-buf (current-buffer)))))
(kill-buffer note-buf))))
(progn
;; Can we store a link?
(with-current-buffer note-buf
(org-store-link nil 1)
(should (car org-stored-links)))
(with-temp-buffer
;; Does the link look correct?
(org-mode)
(org-insert-last-stored-link nil)
(should (string= (buffer-string) (format "[[ekg-note:%d][EKG note: %d]]\n" (ekg-note-id note) (ekg-note-id note))))
;; Does the link work?
(goto-char 1)
(org-open-at-point nil)
(should (eq note-buf (current-buffer)))))
(kill-buffer note-buf))))

(ekg-deftest ekg-test-org-link-to-tags ()
(require 'ol)
Expand Down Expand Up @@ -110,8 +110,8 @@

(ekg-deftest ekg-test-sort-nondestructive ()
(mapc #'ekg-save-note
(list (ekg-note-create :text "a" :mode ekg-capture-default-mode :tags '("tag/a"))
(ekg-note-create :text "b" :mode ekg-capture-default-mode :tags '("tag/b"))))
(list (ekg-note-create :text "a" :mode ekg-capture-default-mode :tags '("tag/a"))
(ekg-note-create :text "b" :mode ekg-capture-default-mode :tags '("tag/b"))))
(ekg-show-notes-with-any-tags '("tag/b" "tag/a"))
(should (string= (car (ewoc-get-hf ekg-notes-ewoc)) "tags (any): tag/a, tag/b")))

Expand Down Expand Up @@ -374,9 +374,9 @@

(ert-deftest ekg--convert-inline-tags-to-links ()
(let ((note (make-ekg-note :text "foo #[bar]")))
(ekg--populate-inline-tags note)
(ekg--convert-inline-tags-to-links note)
(should (equal (ekg-note-text note) "foo #[[ekg-tag:bar][bar]]"))))
(ekg--populate-inline-tags note)
(ekg--convert-inline-tags-to-links note)
(should (equal (ekg-note-text note) "foo #[[ekg-tag:bar][bar]]"))))

(provide 'ekg-test)

Expand Down

0 comments on commit a7aa2f7

Please sign in to comment.