Skip to content

Commit

Permalink
tests: avoid indenting with tabs
Browse files Browse the repository at this point in the history
tabs indentation is up to Emacs' indent functions, we don't need to
test it. Avoiding tabs in tests simplifies comparing the current
indentation and allows to increase test coverage in the next commit.
  • Loading branch information
Hi-Angel committed Jun 7, 2024
1 parent b9e208b commit ff2b0ba
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/tla-pcal-mode-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@
(insert line "\n"))
(goto-char (point-min))
(forward-line n) ; Add something in to place point at various places in line?
(let ((expected-indent (current-indentation)))
(let ((expected-indent (current-indentation))
(pcal-mode-indent-offset 2)
(indent-tabs-mode nil))
(delete-horizontal-space)
(let* ((pcal-mode-indent-offset 2) ; dynamic binding because of defvar
(actual-indent (funcall indent-func))
(let* ((actual-indent (funcall indent-func))
(exp-line (elt lines n)))
;; Add enough extra data to make clear where the failure happened
(should (equal (list expected-indent (list 'line n) exp-line)
Expand Down

0 comments on commit ff2b0ba

Please sign in to comment.