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

add 29.x Emacs versions to CI matrix #208

Merged
merged 2 commits into from
Apr 9, 2024
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
3 changes: 3 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
- 27.2
- 28.1
- 28.2
- 29.1
- 29.2
- 29.3
ignore_warnings:
- true
# NOTE commented out because failure notifications are a distraction
Expand Down
40 changes: 24 additions & 16 deletions julia-mode-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -64,28 +64,36 @@
"Assert that TEXT at position POS gets font-locked with FACE in `julia-mode'."
`(should (eq ,face (julia--get-font-lock ,text ,pos))))

(defun julia--should-move-point-helper (text fun from to &optional end arg)
"Takes the same arguments as `julia--should-move-point', returns a cons of the expected and the actual point."
(with-temp-buffer
(julia-mode)
(insert text)
(indent-region (point-min) (point-max))
(goto-char (point-min))
(if (stringp from)
(re-search-forward from)
(goto-char from))
(funcall fun arg)
(let ((actual-to (point))
(expected-to
(if (stringp to)
(progn (goto-char (point-min))
(re-search-forward to)
(if end (goto-char (match-end 0))
(goto-char (match-beginning 0))
(point-at-bol)))
to)))
(cons expected-to actual-to))))

(defmacro julia--should-move-point (text fun from to &optional end arg)
"With TEXT in `julia-mode', after calling FUN, the point should move FROM\
to TO. If FROM is a string, move the point to matching string before calling
function FUN. If TO is a string, match resulting point to point a beginning of
matching line or end of match if END is non-nil. Optional ARG is passed to FUN."
(declare (indent defun))
`(with-temp-buffer
(julia-mode)
(insert ,text)
(indent-region (point-min) (point-max))
(goto-char (point-min))
(if (stringp ,from)
(re-search-forward ,from)
(goto-char ,from))
(funcall ,fun ,arg)
(should (eq (point) (if (stringp ,to)
(progn (goto-char (point-min))
(re-search-forward ,to)
(if ,end (goto-char (match-end 0))
(goto-char (match-beginning 0))
(point-at-bol)))
,to)))))
`(let ((positions (julia--should-move-point-helper ,text ,fun ,from ,to ,end ,arg)))
(should (eq (car positions) (cdr positions)))))

;;; indent tests

Expand Down
Loading