Skip to content

Commit

Permalink
Add trim-trailing-ws tests
Browse files Browse the repository at this point in the history
With case where read-only-mode is enabled
  • Loading branch information
10sr committed Jul 8, 2018
1 parent c895d8d commit cd943c3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ert-tests/editorconfig.el
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,16 @@
"2_space.el")
(should (eq lisp-indent-offset 2))))
(editorconfig-mode -1))

(ert-deftest test-trim-trailing-ws nil
(editorconfig-mode 1)
(with-visit-file (concat editorconfig-ert-dir
"trim.txt")
(should (memq 'delete-trailing-whitespace
write-file-functions)))
(with-visit-file (concat editorconfig-ert-dir
"trim.txt")
(read-only-mode 1)
(should (not (memq 'delete-trailing-whitespace
write-file-functions))))
(editorconfig-mode -1))

0 comments on commit cd943c3

Please sign in to comment.