branch: scratch/editorconfig-cc commit e0bf9507161f9d788c3ea1b4e972a7c5f7685c7d Author: 10sr <8.slas...@gmail.com> Commit: Stefan Monnier <monn...@iro.umontreal.ca>
Add ert-test for file_type_emacs (#177) --- ert-tests/editorconfig.el | 7 +++++++ ert-tests/test_files_secondary/.editorconfig | 3 +++ 2 files changed, 10 insertions(+) diff --git a/ert-tests/editorconfig.el b/ert-tests/editorconfig.el index cd57f2e26d..b45b87b503 100644 --- a/ert-tests/editorconfig.el +++ b/ert-tests/editorconfig.el @@ -65,3 +65,10 @@ (should (not (memq 'delete-trailing-whitespace write-file-functions)))) (editorconfig-mode -1)) + +(ert-deftest test-file-type-emacs nil + (editorconfig-mode 1) + (with-visit-file (concat editorconfig-secondary-ert-dir + "c.txt") + (should (eq major-mode 'conf-unix-mode))) + (editorconfig-mode -1)) diff --git a/ert-tests/test_files_secondary/.editorconfig b/ert-tests/test_files_secondary/.editorconfig index 5ebe4a1bdd..eeb02d621a 100644 --- a/ert-tests/test_files_secondary/.editorconfig +++ b/ert-tests/test_files_secondary/.editorconfig @@ -3,3 +3,6 @@ root = true [2_space.el] indent_size = 2 indent_style = tab + +[c.txt] +file_type_emacs = conf