aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp
diff options
context:
space:
mode:
authorStefan Monnier2023-11-12 17:08:46 -0500
committerStefan Monnier2023-11-12 17:08:46 -0500
commitcf00f1526d04c0798a6a38c005b5704cf3b825f0 (patch)
tree059d2d8671d3afa00dead6c09c4ca386b72c5c3a /test/lisp
parentb86dcea37c86a3b9cb9fc6c4656b481b2ad1c1e5 (diff)
downloademacs-scratch/derived-mode-add-parents.tar.gz
emacs-scratch/derived-mode-add-parents.zip
Subject: (derived-mode-add-parents): Add documentation and one more testscratch/derived-mode-add-parents
* doc/lispref/modes.texi (Derived Modes): Document new derived-modes API. * test/lisp/subr-tests.el (subt-tests--merge-ordered-lists): New test.
Diffstat (limited to 'test/lisp')
-rw-r--r--test/lisp/subr-tests.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index 03eb0d5bf8c..f67ac70046a 100644
--- a/test/lisp/subr-tests.el
+++ b/test/lisp/subr-tests.el
@@ -381,6 +381,16 @@
381 '(subr-tests--mode-A subr-tests--mode-B prog-mode 381 '(subr-tests--mode-A subr-tests--mode-B prog-mode
382 subr-tests--mode-C subr-tests--derived-mode-1)))))) 382 subr-tests--mode-C subr-tests--derived-mode-1))))))
383 383
384(ert-deftest subt-tests--merge-ordered-lists ()
385 (should (equal (merge-ordered-lists
386 '((B A) (C A) (D B) (E D C)))
387 '(E D B C A)))
388 (should (equal (merge-ordered-lists
389 '((E D C) (B A) (C A) (D B)))
390 '(E D C B A)))
391 (should-error (merge-ordered-lists
392 '((E C D) (B A) (A C) (D B))
393 (lambda (_) (error "cycle")))))
384 394
385(ert-deftest number-sequence-test () 395(ert-deftest number-sequence-test ()
386 (should (= (length 396 (should (= (length