aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp
diff options
context:
space:
mode:
authorTino Calancha2017-08-13 23:41:01 +0900
committerTino Calancha2017-08-13 23:41:46 +0900
commit8c8be4f8f439123859bf20f4d46055fa6c81f2e8 (patch)
treecf47376b76c86f8052e323d9ca974252a8e519ad /test/lisp
parent00bc04f60614907c8042a9f2eb73cc8062006649 (diff)
downloademacs-8c8be4f8f439123859bf20f4d46055fa6c81f2e8.tar.gz
emacs-8c8be4f8f439123859bf20f4d46055fa6c81f2e8.zip
Add test suites for arc-mode and tar-mode
* test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode) * test/lisp/tar-mode-tests.el (tar-mode-test-tar-grind-file-mode): New tests.
Diffstat (limited to 'test/lisp')
-rw-r--r--test/lisp/arc-mode-tests.el36
-rw-r--r--test/lisp/tar-mode-tests.el36
2 files changed, 72 insertions, 0 deletions
diff --git a/test/lisp/arc-mode-tests.el b/test/lisp/arc-mode-tests.el
new file mode 100644
index 00000000000..04047bab62d
--- /dev/null
+++ b/test/lisp/arc-mode-tests.el
@@ -0,0 +1,36 @@
1;;; arc-mode-tests.el --- Test suite for arc-mode. -*- lexical-binding: t -*-
2
3;; Copyright (C) 2017 Free Software Foundation, Inc.
4
5;; This file is part of GNU Emacs.
6
7;; GNU Emacs is free software: you can redistribute it and/or modify
8;; it under the terms of the GNU General Public License as published by
9;; the Free Software Foundation, either version 3 of the License, or
10;; (at your option) any later version.
11
12;; GNU Emacs is distributed in the hope that it will be useful,
13;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;; GNU General Public License for more details.
16
17;; You should have received a copy of the GNU General Public License
18;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19
20;;; Code:
21(require 'ert)
22(require 'arc-mode)
23
24
25(ert-deftest arc-mode-test-archive-int-to-mode ()
26 (let ((alist (list (cons 448 "-rwx------")
27 (cons 420 "-rw-r--r--")
28 (cons 292 "-r--r--r--")
29 (cons 512 "----------")
30 (cons 1024 "---S------"))))
31 (dolist (x alist)
32 (should (equal (cdr x) (archive-int-to-mode (car x)))))))
33
34(provide 'arc-mode-tests)
35
36;; arc-mode-tests.el ends here
diff --git a/test/lisp/tar-mode-tests.el b/test/lisp/tar-mode-tests.el
new file mode 100644
index 00000000000..76ec058e619
--- /dev/null
+++ b/test/lisp/tar-mode-tests.el
@@ -0,0 +1,36 @@
1;;; tar-mode-tests.el --- Test suite for tar-mode. -*- lexical-binding: t -*-
2
3;; Copyright (C) 2017 Free Software Foundation, Inc.
4
5;; This file is part of GNU Emacs.
6
7;; GNU Emacs is free software: you can redistribute it and/or modify
8;; it under the terms of the GNU General Public License as published by
9;; the Free Software Foundation, either version 3 of the License, or
10;; (at your option) any later version.
11
12;; GNU Emacs is distributed in the hope that it will be useful,
13;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;; GNU General Public License for more details.
16
17;; You should have received a copy of the GNU General Public License
18;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19
20;;; Code:
21(require 'ert)
22(require 'tar-mode)
23
24
25(ert-deftest tar-mode-test-tar-grind-file-mode ()
26 (let ((alist (list (cons 448 "rwx------")
27 (cons 420 "rw-r--r--")
28 (cons 292 "r--r--r--")
29 (cons 512 "--------T")
30 (cons 1024 "-----S---"))))
31 (dolist (x alist)
32 (should (equal (cdr x) (tar-grind-file-mode (car x)))))))
33
34(provide 'tar-mode-tests)
35
36;; tar-mode-tests.el ends here