aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lisp/progmodes/ps-mode-tests.el37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/lisp/progmodes/ps-mode-tests.el b/test/lisp/progmodes/ps-mode-tests.el
new file mode 100644
index 00000000000..aa0c4f3a059
--- /dev/null
+++ b/test/lisp/progmodes/ps-mode-tests.el
@@ -0,0 +1,37 @@
1;;; ps-mode-tests.el --- Test suite for ps-mode
2
3;; Copyright (C) 2019 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 <https://www.gnu.org/licenses/>.
19
20;;; Commentary:
21
22;;; Code:
23
24(require 'ert)
25(require 'ps-mode)
26
27(ert-deftest ps-mode-test-octal-region ()
28 (with-temp-buffer
29 (set-buffer-multibyte nil)
30 (insert "foo" #x90 #x91 #x92 "bar")
31 (ps-mode-octal-region (point-min) (point-max))
32 (should (equal (buffer-string)
33 "foo\\220\\221\\222bar"))))
34
35(provide 'ps-mode-tests)
36
37;;; ps-mode-tests.el ends here