Skip to content

Commit

Permalink
Use level one heading in markdown, set explicit time format in test
Browse files Browse the repository at this point in the history
  • Loading branch information
matsl committed Dec 1, 2023
1 parent 158a407 commit 4f1af8e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
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

0 comments on commit 4f1af8e

Please sign in to comment.