-
Notifications
You must be signed in to change notification settings - Fork 1
/
csproj-mode-tests.el
33 lines (25 loc) · 1.06 KB
/
csproj-mode-tests.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
;;; Code:
(require 'ert)
(require 'csproj-mode)
(ert-deftest csproj-mode-is-the-default-mode-for-csproj-files ()
(find-file "test.csproj")
(should (equal major-mode 'csproj-mode)))
(ert-deftest csproj-mode-is-the-default-mode-for-vbproj-files ()
(find-file "test.vbproj")
(should (equal major-mode 'csproj-mode)))
(ert-deftest csproj-mode-is-the-default-mode-for-proj-files ()
(find-file "test.proj")
(should (equal major-mode 'csproj-mode)))
(ert-deftest csproj-mode-is-not-the-default-mode-for-xml-files ()
(find-file "Hello.xml")
(should-not (equal major-mode 'csproj-mode)))
(ert-deftest csproj-mode-finds-dotnet-new-templates ()
(let ((template-names (csproj-mode--get-dotnet-new-templates)))
(should (member "console" template-names))
(should (member "sln" template-names))
(should (member "web" template-names))
(should (member "webapi" template-names))
(should (member "mvc" template-names))
(should-not (member "--help" template-names))
(should-not (member "example" template-names))))
;;; csproj-mode-tests.el ends here