Fix problem with some other tests stopping to work.

* Use let to set variables for plantuml-test-indent-block-with-tabs
This commit is contained in:
mtoboid 2021-06-17 12:22:57 +02:00
parent 87b3c1ed0d
commit d32e9acec6
1 changed files with 14 additions and 13 deletions

View File

@ -81,21 +81,22 @@ will be indented with one tab for each level of indentation.
Finally, the indented text in the buffer will be compared with AFTER." Finally, the indented text in the buffer will be compared with AFTER."
(with-temp-buffer ;; ensure that plantuml-indent-level is the default value 8
;; fix the JAR location prior to mode initialization (let ((indent-tabs-mode t)
;; for some reason, plantuml-mode disregards the setq-local (plantuml-indent-level 8)
(setq plantuml-jar-path plantuml-test-jar-path) ;; fix the JAR location prior to mode initialization
(plantuml-init-once 'jar) ;; for some reason, plantuml-mode disregards the setq-local
(plantuml-jar-path plantuml-test-jar-path))
(insert before) (with-temp-buffer
(goto-char (point-min)) (plantuml-init-once 'jar)
(plantuml-mode)
;; ensure that plantuml-indent-level is the default value 8
(setq indent-tabs-mode t)
(setq plantuml-indent-level 8)
(indent-region (point-min) (point-max)) (insert before)
(should (equal (buffer-string) after)))) (goto-char (point-min))
(plantuml-mode)
(indent-region (point-min) (point-max))
(should (equal (buffer-string) after)))))
;; enable code coverage ;; enable code coverage
(when (require 'undercover nil t) (when (require 'undercover nil t)