-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdrupal-tests.el
54 lines (33 loc) · 1.36 KB
/
drupal-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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
;;; drupal-tests.el --- ert tests for drupal-mode
;; Copyright (C) 2012 Arne Jørgensen
;; Author: Arne Jørgensen <[email protected]>
;; This file is part of Drupal mode.
;; Drupal mode is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published
;; by the Free Software Foundation, either version 3 of the License,
;; or (at your option) any later version.
;; Drupal mode is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with Drupal mode. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; Drupal mode is an advanced minor mode for developing in Drupal.
;;; Code:
(require 'drupal-mode)
(require 'ert)
(defun drupal-tests ()
"Run drupal-mode ERT test cases."
(interactive)
(ert "drupal-.*"))
(ert-deftest drupal-major-version-test ()
"Test `drupal-major-version'."
(should (equal (drupal-major-version "7.12") "7"))
(should (equal (drupal-major-version "6.1") "6"))
(should (equal (drupal-major-version "4.5.2") "4.5")))
(provide 'drupal-tests)
;; Local Variables:
;; coding: utf-8
;; End:
;;; drupal-tests.el ends here