From: Stefan Monnier <monnier@iro.umontreal.ca>
Date: Wed, 20 Mar 2019 14:52:30 +0000 (-0400)
Subject: * test/lisp/minibuffer-tests.el (completion-table-subvert-test): New test
X-Git-Tag: emacs-27.0.90~3382
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=18fc4ac5294d85e37d9e544c04b5d4e89ef3237c;p=emacs.git

* test/lisp/minibuffer-tests.el (completion-table-subvert-test): New test
---

diff --git a/test/lisp/minibuffer-tests.el b/test/lisp/minibuffer-tests.el
index 77bfea93716..35df7cc17f1 100644
--- a/test/lisp/minibuffer-tests.el
+++ b/test/lisp/minibuffer-tests.el
@@ -74,5 +74,11 @@
                     'completion-table-with-predicate
                     full-collection no-A nil))))))
 
+(ert-deftest completion-table-subvert-test ()
+  (let* ((origtable '("A-hello" "A-there"))
+         (subvtable (completion-table-subvert origtable "B" "A")))
+    (should (equal (try-completion "B-hel" subvtable)
+                   "B-hello"))))
+
 (provide 'completion-tests)
 ;;; completion-tests.el ends here