From: Daniel Martín Date: Sat, 19 Sep 2020 17:15:48 +0000 (+0200) Subject: Put files in mhtml-mode when they have ]*>[ \t\r\n]*<[ \t\r\n]*" comment-re "*\\)?" "[Hh][Tt][Mm][Ll]")) . mhtml-mode) - ("." (should (equal (parse-colon-path "/foo//bar/baz") '("/foo/bar/baz/")))) +(ert-deftest files-test-magic-mode-alist-doctype () + "Test that DOCTYPE and variants put files in mhtml-mode." + (with-temp-buffer + (goto-char (point-min)) + (insert "") + (normal-mode) + (should (eq major-mode 'mhtml-mode)) + (erase-buffer) + (insert "") + (normal-mode) + (should (eq major-mode 'mhtml-mode)))) + (provide 'files-tests) ;;; files-tests.el ends here