Skip to content

Commit 015cbf8

Browse files
committed
Fix the nil case for align tests
1 parent ac53b3b commit 015cbf8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/clojure-mode-indentation-test.el

+5-4
Original file line numberDiff line numberDiff line change
@@ -422,11 +422,12 @@ x
422422
`(with-temp-buffer
423423
(clojure-mode)
424424
(insert "\n" ,(replace-regexp-in-string " +" " " form))
425+
;; This is to check that we did NOT align anything. Run
426+
;; `indent-region' and then check that no extra spaces
427+
;; where inserted besides the start of the line.
425428
(indent-region (point-min) (point-max))
426-
(should (equal (buffer-substring-no-properties
427-
(point-min) (point-max))
428-
,(concat "\n" (replace-regexp-in-string
429-
"\\([a-z]\\) +" "\\1 " form))))))
429+
(goto-char (point-min))
430+
(should-not (search-forward-regexp "\\([^\s\n]\\) +" nil 'noerror))))
430431
forms))))
431432

432433
(def-full-align-test basic

0 commit comments

Comments
 (0)