Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use level one heading in markdown, set explicit time format in test #411

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2023-12-01 Mats Lidell <[email protected]>

* test/hyrolo-tests.el (hyrolo-sort-test): Set default date format so the
format used is well defined.
(hyrolo-fgrep-and-goto-next-visible-md-heading): Use level one heading
so that heading hierarchy is respected.

2023-12-01 Bob Weiner <[email protected]>

* hargs.el (hargs:delimited): Remove use of 'bounds-of-thing-at-point'
Expand Down
9 changes: 5 additions & 4 deletions test/hyrolo-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Mats Lidell <[email protected]>
;;
;; Orig-Date: 19-Jun-21 at 22:42:00
;; Last-Mod: 29-Nov-23 at 23:22:15 by Mats Lidell
;; Last-Mod: 1-Dec-23 at 23:20:39 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -206,7 +206,8 @@ and {b} the previous same level cell."
"HyRolo files can be sorted."
(let ((hyrolo-file (make-temp-file "hypb" nil ".otl")))
(unwind-protect
(let ((hyrolo-file-list (list hyrolo-file)))
(let ((hyrolo-file-list (list hyrolo-file))
(hyrolo-date-format "%m/%d/%Y"))
(hyrolo-find-file (car (hyrolo-get-file-list)))
(insert "===\nHdr\n===\n")
(goto-char (point-min))
Expand Down Expand Up @@ -364,7 +365,7 @@ and {b} the previous same level cell."
"Verify move to next heading, then action-key to go to record for markdown mode."
:expected-result :failed
(let* ((temporary-file-directory (make-temp-file "hypb" t))
(md-file (make-temp-file "hypb" nil ".md" "## heading\nstring\nmore\n"))
(md-file (make-temp-file "hypb" nil ".md" "# heading\nstring\nmore\n"))
(hyrolo-file-list (list temporary-file-directory)))
(unwind-protect
(progn
Expand All @@ -377,7 +378,7 @@ and {b} the previous same level cell."
(with-simulated-input "y RET" ; Do you want to revisit the file normally now?
(action-key)
(should (equal (current-buffer) (find-buffer-visiting md-file)))
(should (looking-at-p "## heading"))))
(should (looking-at-p "# heading"))))
(hy-delete-file-and-buffer md-file)
(kill-buffer "*HyRolo*")
(delete-directory temporary-file-directory))))
Expand Down