summaryrefslogtreecommitdiff
path: root/fzytest.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john.hawthorn@gmail.com>2014-08-03 19:17:32 -0700
committerJohn Hawthorn <john.hawthorn@gmail.com>2014-08-03 19:37:02 -0700
commitc2d82530e296ef106589c8c12dc58e607e93fa8d (patch)
treed90fec01ad81d4f3cd8de3fd16170770884901f1 /fzytest.c
parentdeee6d505299c0504dd6b40cf2669b18068d3c95 (diff)
Use SCORE_MATCH_SLASH for first character
Diffstat (limited to 'fzytest.c')
-rw-r--r--fzytest.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fzytest.c b/fzytest.c
index 1db3009..7e16367 100644
--- a/fzytest.c
+++ b/fzytest.c
@@ -44,6 +44,9 @@ int test_scoring(){
/* Prefer shorter matches */
assert(match("test", "tests") > match("test", "testing"));
+ /* Scores first letter highly */
+ assert(match("test", "testing") > match("test", "/testing"));
+
/* Prefer shorter matches */
assert(match("abc", " a b c ") > match("abc", " a b c "));
assert(match("abc", " a b c ") > match("abc", " a b c "));