emacs-diffs
[Top][All Lists]
Advanced

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

emacs-28 8db5f82d45: ; Fix tabulated-list-mode tests after revert


From: Stefan Kangas
Subject: emacs-28 8db5f82d45: ; Fix tabulated-list-mode tests after revert
Date: Tue, 11 Jan 2022 00:18:12 -0500 (EST)

branch: emacs-28
commit 8db5f82d452797ec4530c959aac3cc2d19dd795a
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    ; Fix tabulated-list-mode tests after revert
    
    * test/lisp/emacs-lisp/tabulated-list-tests.el
    (tabulated-list-print, tabulated-list-sort): Fix tests.
---
 test/lisp/emacs-lisp/tabulated-list-tests.el | 59 +++++++++++++++++-----------
 1 file changed, 37 insertions(+), 22 deletions(-)

diff --git a/test/lisp/emacs-lisp/tabulated-list-tests.el 
b/test/lisp/emacs-lisp/tabulated-list-tests.el
index 0074b10170..3ce4a63f4f 100644
--- a/test/lisp/emacs-lisp/tabulated-list-tests.el
+++ b/test/lisp/emacs-lisp/tabulated-list-tests.el
@@ -55,28 +55,37 @@
 (ert-deftest tabulated-list-print ()
   (tabulated-list--test-with-buffer
    ;; Basic printing.
-   (should (string= (buffer-substring-no-properties (point-min) (point-max))
-                  "       zzzz-game          zzzz-game          2113         
installed           play zzzz in Emacs
-       4clojure          4clojure          1507         obsolete           
Open and evaluate 4clojure.com questions
-       abc-mode          abc-mode          944         available           
Major mode for editing abc music files
-       mode          mode          1128         installed           A simple 
mode for editing Actionscript 3 files\n"))
+   (should (string-equal
+            (buffer-substring-no-properties (point-min) (point-max))
+            "\
+       zzzz-game  zzzz-game  2113      installed   play zzzz in Emacs
+       4clojure   4clojure   1507      obsolete    Open and evaluate 
4clojure.com questions
+       abc-mode   abc-mode   944       available   Major mode for editing abc 
music files
+       mode       mode       1128      installed   A simple mode for editing 
Actionscript 3 files
+"))
    ;; Preserve position.
    (forward-line 3)
    (let ((pos (thing-at-point 'line)))
      (pop tabulated-list-entries)
      (tabulated-list-print t)
      (should (equal (thing-at-point 'line) pos))
-     (should (string= (buffer-substring-no-properties (point-min) (point-max))
-                      "       4clojure          4clojure          1507         
obsolete           Open and evaluate 4clojure.com questions
-       abc-mode          abc-mode          944         available           
Major mode for editing abc music files
-       mode          mode          1128         installed           A simple 
mode for editing Actionscript 3 files\n"))
+     (should (string-equal
+              (buffer-substring-no-properties (point-min) (point-max))
+              "\
+       4clojure   4clojure   1507      obsolete    Open and evaluate 
4clojure.com questions
+       abc-mode   abc-mode   944       available   Major mode for editing abc 
music files
+       mode       mode       1128      installed   A simple mode for editing 
Actionscript 3 files
+"))
      ;; Check the UPDATE argument
      (pop tabulated-list-entries)
      (setf (cdr (car tabulated-list-entries)) (list ["x" "x" "944" "available" 
" XX"]))
      (tabulated-list-print t t)
-     (should (string= (buffer-substring-no-properties (point-min) (point-max))
-                      "       x          x          944         available      
     XX
-       mode          mode          1128         installed           A simple 
mode for editing Actionscript 3 files\n"))
+     (should (string-equal
+              (buffer-substring-no-properties (point-min) (point-max))
+              "\
+       x          x          944       available   XX
+       mode       mode       1128      installed   A simple mode for editing 
Actionscript 3 files
+"))
      (should (equal (thing-at-point 'line) pos)))))
 
 (ert-deftest tabulated-list-sort ()
@@ -86,11 +95,14 @@
    (skip-chars-forward "[:blank:]")
    (tabulated-list-sort)
    (let ((text (buffer-substring-no-properties (point-min) (point-max))))
-     (should (string= text
-                      "       4clojure          4clojure          1507         
obsolete           Open and evaluate 4clojure.com questions
-       abc-mode          abc-mode          944         available           
Major mode for editing abc music files
-       mode          mode          1128         installed           A simple 
mode for editing Actionscript 3 files
-       zzzz-game          zzzz-game          2113         installed           
play zzzz in Emacs\n"))
+     (should (string-equal
+              text
+              "\
+       4clojure   4clojure   1507      obsolete    Open and evaluate 
4clojure.com questions
+       abc-mode   abc-mode   944       available   Major mode for editing abc 
music files
+       mode       mode       1128      installed   A simple mode for editing 
Actionscript 3 files
+       zzzz-game  zzzz-game  2113      installed   play zzzz in Emacs
+"))
 
      (skip-chars-forward "^[:blank:]")
      (skip-chars-forward "[:blank:]")
@@ -101,11 +113,14 @@
      (should (string= text (buffer-substring-no-properties (point-min) 
(point-max))))
      ;; Invert.
      (tabulated-list-sort 1)
-     (should (string= (buffer-substring-no-properties (point-min) (point-max))
-                      "       zzzz-game          zzzz-game          2113       
  installed           play zzzz in Emacs
-       mode          mode          1128         installed           A simple 
mode for editing Actionscript 3 files
-       abc-mode          abc-mode          944         available           
Major mode for editing abc music files
-       4clojure          4clojure          1507         obsolete           
Open and evaluate 4clojure.com questions\n"))
+     (should (string-equal
+              (buffer-substring-no-properties (point-min) (point-max))
+              "\
+       zzzz-game  zzzz-game  2113      installed   play zzzz in Emacs
+       mode       mode       1128      installed   A simple mode for editing 
Actionscript 3 files
+       abc-mode   abc-mode   944       available   Major mode for editing abc 
music files
+       4clojure   4clojure   1507      obsolete    Open and evaluate 
4clojure.com questions
+"))
      ;; Again
      (tabulated-list-sort 1)
      (should (string= text (buffer-substring-no-properties (point-min) 
(point-max)))))



reply via email to

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