From 340c0bbac53df00c2d0c00d3e626776c4a6016bf Mon Sep 17 00:00:00 2001 From: w0rp Date: Tue, 11 Jul 2017 23:47:13 +0100 Subject: #756 Escape the paths used for the --include parameter for gometalinter, which uses RE2 --- test/test_regex_escaping.vader | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 test/test_regex_escaping.vader (limited to 'test/test_regex_escaping.vader') 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('/') -- cgit v1.2.3