diff options
author | Juri Linkov <juri@linkov.net> | 2024-09-01 20:17:03 +0300 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2024-09-01 20:17:03 +0300 |
commit | e0d8879bcd58c9eb5001cdc5294c126f742db63c (patch) | |
tree | 097ba95665e748c88164e2df16f9e0b1e92de995 /test/lisp/emacs-lisp | |
parent | 4ff4b78f922353236cb2970270dd175c8011ba8f (diff) | |
download | emacs-e0d8879bcd58c9eb5001cdc5294c126f742db63c.tar.gz emacs-e0d8879bcd58c9eb5001cdc5294c126f742db63c.tar.bz2 emacs-e0d8879bcd58c9eb5001cdc5294c126f742db63c.zip |
* test/lisp/emacs-lisp/tabulated-list-tests.el: Add missing test.
(tabulated-list-groups-with-path): Add test for tabulated-list-groups.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r-- | test/lisp/emacs-lisp/tabulated-list-tests.el | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/tabulated-list-tests.el b/test/lisp/emacs-lisp/tabulated-list-tests.el index e53268b3f14..7edcaaf9441 100644 --- a/test/lisp/emacs-lisp/tabulated-list-tests.el +++ b/test/lisp/emacs-lisp/tabulated-list-tests.el @@ -171,4 +171,31 @@ 4clojure 4clojure 1507 obsolete Open and evaluate 4clojure.com questions "))))) +(ert-deftest tabulated-list-groups-with-path () + (with-temp-buffer + (tabulated-list-mode) + (setq tabulated-list-groups + (tabulated-list-groups + tabulated-list--test-entries + `( :path-function (lambda (entry) + (list (list (aref (cadr entry) 3)))) + :sort-function (lambda (groups _level) + (sort groups :in-place t :key #'car))))) + (setq tabulated-list-format tabulated-list--test-format) + (setq tabulated-list-padding 7) + (tabulated-list-init-header) + (tabulated-list-print) + ;; Basic printing. + (should (string-equal + (buffer-substring-no-properties (point-min) (point-max)) + "\ +* available + abc-mode abc-mode 944 available Major mode for editing abc music files +* installed + zzzz-game zzzz-game 2113 installed play zzzz in Emacs + mode mode 1128 installed A simple mode for editing Actionscript 3 files +* obsolete + 4clojure 4clojure 1507 obsolete Open and evaluate 4clojure.com questions +")))) + ;;; tabulated-list-tests.el ends here |