branch: externals/hotfuzz
commit 8c3bf82dda4075a62964576533e7ad417880cf4a
Author: Axel Forsman <[email protected]>
Commit: Axel Forsman <[email protected]>

    Add test of highlighting
---
 test/tests.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/test/tests.el b/test/tests.el
index b861427cca..9f80cd3ffa 100644
--- a/test/tests.el
+++ b/test/tests.el
@@ -27,6 +27,14 @@
               (hotfuzz--cost "x" ".x")
               (hotfuzz--cost "x" "yx"))))
 
+;;; Highlighting tests
+
+(ert-deftest highlight-optimal-test ()
+  "Test that the algorithm is non-greedy."
+  (should (ert-equal-including-properties
+           (hotfuzz-highlight "ab" "xaxbxabxaxbx")
+           #("xaxbxabxaxbx" 5 7 (face completions-common-part)))))
+
 ;;; Filtering tests
 
 (ert-deftest case-sensitivity-test ()

Reply via email to