diff options
| author | Stephen Blott | 2012-11-14 05:36:23 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2012-11-14 05:36:23 +0000 | 
| commit | 9225a09cec3db2213a1324f20ec6195ad281dbef (patch) | |
| tree | 36033be60f40bc01077e1a02b26f374b58473e7b /tests/unit_tests/completion_test.coffee | |
| parent | 4dc517401a2d01d34455498ff805e81f7f4f2674 (diff) | |
| download | vimium-9225a09cec3db2213a1324f20ec6195ad281dbef.tar.bz2 | |
Clean up regexp unit tests.
Diffstat (limited to 'tests/unit_tests/completion_test.coffee')
| -rw-r--r-- | tests/unit_tests/completion_test.coffee | 14 | 
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/unit_tests/completion_test.coffee b/tests/unit_tests/completion_test.coffee index 8b6ba3ea..0d1b90c3 100644 --- a/tests/unit_tests/completion_test.coffee +++ b/tests/unit_tests/completion_test.coffee @@ -258,17 +258,17 @@ context "suggestions",  context "RankingUtils",    should "do a case insensitive match", -> -    assert.isTrue RankingUtils.matches(["ari"], "maRio", "mario") +    assert.isTrue RankingUtils.matches(["ari"], "maRio")    should "do a case insensitive match on full term", -> -    assert.isTrue RankingUtils.matches(["mario"], "MARIO", "MARio") +    assert.isTrue RankingUtils.matches(["mario"], "MARio") -  should "do a case insensitive match on more than just two terms", -> +  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", -> -    assert.isTrue RankingUtils.matches(["Mar"], "Mario", "mario") -    assert.isFalse RankingUtils.matches(["Mar"], "mario", "mario") +    assert.isTrue RankingUtils.matches(["Mar"], "Mario") +    assert.isFalse RankingUtils.matches(["Mar"], "mario")    should "do a smartcase match on full term", ->      assert.isTrue RankingUtils.matches(["Mario"], "Mario") @@ -280,10 +280,10 @@ context "RankingUtils",    should "do case insensitive word relevancy (not matching)", ->      assert.isTrue RankingUtils.wordRelevancy(["DOES_NOT_MATCH"], "MARIO", "MARio") == 0.0 -  should "every term must match at least one thing (matching)", -> +  should "every query term must match at least one thing (matching)", ->      assert.isTrue RankingUtils.matches(["cat", "dog"], "catapult", "hound dog") -  should "every term must match at least one thing (not matching)", -> +  should "every query term must match at least one thing (not matching)", ->      assert.isTrue not RankingUtils.matches(["cat", "dog", "wolf"], "catapult", "hound dog")  context "RegexpCache",  | 
