emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master c25e375 1/2: Add more ps-mode octal tests


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master c25e375 1/2: Add more ps-mode octal tests
Date: Wed, 12 Jun 2019 21:12:13 -0400 (EDT)

branch: master
commit c25e3754ed85b668f2a9b56db8eb5572cf973826
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Add more ps-mode octal tests
    
    * test/lisp/progmodes/ps-mode-tests.el
    (ps-mode-test-octal-region-multibyte): New test.
---
 test/lisp/progmodes/ps-mode-tests.el | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/test/lisp/progmodes/ps-mode-tests.el 
b/test/lisp/progmodes/ps-mode-tests.el
index aa0c4f3..9f157e0 100644
--- a/test/lisp/progmodes/ps-mode-tests.el
+++ b/test/lisp/progmodes/ps-mode-tests.el
@@ -24,7 +24,7 @@
 (require 'ert)
 (require 'ps-mode)
 
-(ert-deftest ps-mode-test-octal-region ()
+(ert-deftest ps-mode-test-octal-region-unibyte ()
   (with-temp-buffer
     (set-buffer-multibyte nil)
     (insert "foo" #x90 #x91 #x92 "bar")
@@ -32,6 +32,17 @@
     (should (equal (buffer-string)
                    "foo\\220\\221\\222bar"))))
 
+(ert-deftest ps-mode-test-octal-region-multibyte ()
+  (with-temp-buffer
+    (insert "foo"
+            (unibyte-char-to-multibyte #x90)
+            (unibyte-char-to-multibyte #x91)
+            (unibyte-char-to-multibyte #x92)
+            "bar")
+    (ps-mode-octal-region (point-min) (point-max))
+    (should (equal (buffer-string)
+                   "foo\\220\\221\\222bar"))))
+
 (provide 'ps-mode-tests)
 
 ;;; ps-mode-tests.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]