summaryrefslogtreecommitdiff
path: root/test/test_regex_escaping.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-07-11 23:47:13 +0100
committerw0rp <devw0rp@gmail.com>2017-07-11 23:47:21 +0100
commit340c0bbac53df00c2d0c00d3e626776c4a6016bf (patch)
tree566b7230e948f7a3a0bb646ec52fab5e3c98103f /test/test_regex_escaping.vader
parentd12e990f73156506fecfe7bb229dff8b8d57ee4a (diff)
downloadale-340c0bbac53df00c2d0c00d3e626776c4a6016bf.zip
#756 Escape the paths used for the --include parameter for gometalinter, which uses RE2
Diffstat (limited to 'test/test_regex_escaping.vader')
-rw-r--r--test/test_regex_escaping.vader4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_regex_escaping.vader b/test/test_regex_escaping.vader
new file mode 100644
index 00000000..b79b8c56
--- /dev/null
+++ b/test/test_regex_escaping.vader
@@ -0,0 +1,4 @@
+Execute(ale#util#EscapePCRE should escape strings for PCRE or RE2 appropriately):
+ AssertEqual '\\\^\$\*\+\?\.\(\)\|\{\}\[\]', ale#util#EscapePCRE('\^$*+?.()|{}[]')
+ AssertEqual 'abcABC09', ale#util#EscapePCRE('abcABC09')
+ AssertEqual '/', ale#util#EscapePCRE('/')