aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit_tests/completion_test.coffee
diff options
context:
space:
mode:
authorStephen Blott2012-11-14 05:59:21 +0000
committerStephen Blott2012-11-14 05:59:21 +0000
commit049cf4314fc2e97e0f5b09cd8a8d066e2c04eb8a (patch)
tree50507491aa7095e9285a7bc4e44735d498221fd3 /tests/unit_tests/completion_test.coffee
parent9225a09cec3db2213a1324f20ec6195ad281dbef (diff)
downloadvimium-049cf4314fc2e97e0f5b09cd8a8d066e2c04eb8a.tar.bz2
RegexpCache: reorganise and improve tests.
Diffstat (limited to 'tests/unit_tests/completion_test.coffee')
-rw-r--r--tests/unit_tests/completion_test.coffee10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/unit_tests/completion_test.coffee b/tests/unit_tests/completion_test.coffee
index 0d1b90c3..fb267f63 100644
--- a/tests/unit_tests/completion_test.coffee
+++ b/tests/unit_tests/completion_test.coffee
@@ -266,10 +266,18 @@ context "RankingUtils",
should "do a case insensitive match on several terms", ->
assert.isTrue RankingUtils.matches(["ari"], "DOES_NOT_MATCH", "DOES_NOT_MATCH_EITHER", "MARio")
- should "do a smartcase match", ->
+ should "do a smartcase match (positive)", ->
assert.isTrue RankingUtils.matches(["Mar"], "Mario")
+
+ should "do a smartcase match (negative)", ->
assert.isFalse RankingUtils.matches(["Mar"], "mario")
+ should "do a match with regexp meta-characters (positive)", ->
+ assert.isTrue RankingUtils.matches(["ma.io"], "ma.io")
+
+ should "do a match with regexp meta-characters (negative)", ->
+ assert.isFalse RankingUtils.matches(["ma.io"], "mario")
+
should "do a smartcase match on full term", ->
assert.isTrue RankingUtils.matches(["Mario"], "Mario")
assert.isFalse RankingUtils.matches(["Mario"], "mario")