Skip to content

Commit

Permalink
fix: testing harness
Browse files Browse the repository at this point in the history
track-changes is not signalled in the middle of our tests so we must
signal it ourselves
  • Loading branch information
justinbarclay committed May 2, 2024
1 parent a88eff7 commit 3a3614a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ version:
download:
ifeq (,$(wildcard $(HOME)/.emacs.d/parinfer-rust/parinfer-rust-$(OS).so))
mkdir -p $(HOME)/.emacs.d/parinfer-rust
curl -L "https://github.com/justinbarclay/parinfer-rust/releases/download/v0.4.4/parinfer-rust-$(OS).so" -o "$(HOME)/.emacs.d/parinfer-rust/parinfer-rust-$(OS).so"
curl -L "https://github.com/justinbarclay/parinfer-rust/releases/download/v0.4.5/parinfer-rust-$(OS).so" -o "$(HOME)/.emacs.d/parinfer-rust/parinfer-rust-$(OS).so"
endif

test: clean elpa version download build
Expand Down
11 changes: 7 additions & 4 deletions test/test-helper.el
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,13 @@ extracted from the json-alist."
(parinfer-rust-mode)
(setq-local parinfer-rust--mode mode)
(when changes
(mapc
'apply-changes-in-buffer
changes))
(progn
(mapc
'apply-changes-in-buffer
changes)))
(parinfer-rust--fetch-changes parinfer-rust--change-tracker)
(move-cursor-to-current-position)
(parinfer-rust--execute) ;; Parinfer execute doesn't run after apply-changes so we have to call in manually
(parinfer-rust--execute)
(parinfer-rust-mode)
(when remove-first-line
(progn
Expand Down Expand Up @@ -237,6 +239,7 @@ extracted from the json-alist."
(forward-line (1- lineNo))
(forward-char column)
(apply command nil)
(parinfer-rust--fetch-changes parinfer-rust--change-tracker)
(parinfer-rust--execute)))
(setq parinfer-result-string (buffer-substring-no-properties (point-min) (point-max))) ;; Save the string before we kill our current buffer
(switch-to-buffer current)
Expand Down

0 comments on commit 3a3614a

Please sign in to comment.