emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/compat 3f3f2e44d5 43/84: Split compat-insert-into-buffe


From: ELPA Syncer
Subject: [elpa] externals/compat 3f3f2e44d5 43/84: Split compat-insert-into-buffer into multiple tests
Date: Tue, 3 Jan 2023 08:57:34 -0500 (EST)

branch: externals/compat
commit 3f3f2e44d50f7ea00f06be8e9d4929735b6fde77
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Split compat-insert-into-buffer into multiple tests
---
 compat-tests.el | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/compat-tests.el b/compat-tests.el
index 9e1fefab71..c51a2e8041 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -355,9 +355,8 @@ being compared against."
   (ought t 1)                      ;single argument
   (ought t 1 2 3 4))              ;multiple arguments
 
-(ert-deftest compat-insert-into-buffer ()
-  "Check if `insert-into-buffer' was implemented correctly."
-  ;; Without optional compat--arguments
+(ert-deftest compat-insert-into-buffer-1 ()
+  "Check if `insert-into-buffer' can handle no optional argument."
   (with-temp-buffer
     (let ((other (current-buffer)))
       (insert "abc")
@@ -372,8 +371,10 @@ being compared against."
        (with-temp-buffer
          (insert "def")
          (insert-into-buffer other))
-       (should (string= (buffer-string) "abcdef")))))
-  ;; With one optional argument
+       (should (string= (buffer-string) "abcdef"))))))
+
+(ert-deftest compat-insert-into-buffer-2 ()
+  "Check if `insert-into-buffer' handles one optional argument."
   (with-temp-buffer
     (let ((other (current-buffer)))
       (insert "abc")
@@ -388,8 +389,10 @@ being compared against."
        (with-temp-buffer
          (insert "def")
          (insert-into-buffer other 2))
-       (should (string= (buffer-string) "abcef")))))
-  ;; With two optional arguments
+       (should (string= (buffer-string) "abcef"))))))
+
+(ert-deftest compat-insert-into-buffer-3 ()
+  "Check if `insert-into-buffer' handles two optional arguments."
   (with-temp-buffer
     (let ((other (current-buffer)))
       (insert "abc")



reply via email to

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