aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorStephen Blott2016-03-27 10:10:28 +0100
committerStephen Blott2016-03-27 10:10:28 +0100
commit824ab0dc6bd8bec3c75834b736360276877dd74c (patch)
treedf4bbbabece7f09f98ba697c0f8ee7eaab006fe9 /tests
parent0656f3ef0dd5f3cfa12f6c925298f30168b00e12 (diff)
downloadvimium-824ab0dc6bd8bec3c75834b736360276877dd74c.tar.bz2
Add test for escapeRegexSpecialCharacters().
Diffstat (limited to 'tests')
-rw-r--r--tests/unit_tests/utils_test.coffee7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit_tests/utils_test.coffee b/tests/unit_tests/utils_test.coffee
index 691b26ec..fa35be97 100644
--- a/tests/unit_tests/utils_test.coffee
+++ b/tests/unit_tests/utils_test.coffee
@@ -149,3 +149,10 @@ context "invokeCommandString",
assert.isFalse @beenCalled
Utils.invokeCommandString "twoComponentCommand.command"
assert.isTrue @beenCalled
+
+context "escapeRegexSpecialCharacters",
+ should "escape regexp special characters", ->
+ str = "-[]/{}()*+?.^$|"
+ regexp = new RegExp Utils.escapeRegexSpecialCharacters str
+ assert.isTrue regexp.test str
+