summaryrefslogtreecommitdiff
path: root/test/lisp/arc-mode-tests.el
diff options
context:
space:
mode:
authorTino Calancha <tino.calancha@gmail.com>2017-08-13 23:41:01 +0900
committerTino Calancha <tino.calancha@gmail.com>2017-08-13 23:41:46 +0900
commit8c8be4f8f439123859bf20f4d46055fa6c81f2e8 (patch)
treecf47376b76c86f8052e323d9ca974252a8e519ad /test/lisp/arc-mode-tests.el
parent00bc04f60614907c8042a9f2eb73cc8062006649 (diff)
downloademacs-8c8be4f8f439123859bf20f4d46055fa6c81f2e8.tar.gz
emacs-8c8be4f8f439123859bf20f4d46055fa6c81f2e8.tar.bz2
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/arc-mode-tests.el')
-rw-r--r--test/lisp/arc-mode-tests.el36
1 files changed, 36 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 @@
+;;; arc-mode-tests.el --- Test suite for arc-mode. -*- lexical-binding: t -*-
+
+;; Copyright (C) 2017 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs 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.
+
+;; GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+(require 'ert)
+(require 'arc-mode)
+
+
+(ert-deftest arc-mode-test-archive-int-to-mode ()
+ (let ((alist (list (cons 448 "-rwx------")
+ (cons 420 "-rw-r--r--")
+ (cons 292 "-r--r--r--")
+ (cons 512 "----------")
+ (cons 1024 "---S------"))))
+ (dolist (x alist)
+ (should (equal (cdr x) (archive-int-to-mode (car x)))))))
+
+(provide 'arc-mode-tests)
+
+;; arc-mode-tests.el ends here