summaryrefslogtreecommitdiff
path: root/test/test_getmatches.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2021-03-15 22:30:22 +0000
committerw0rp <devw0rp@gmail.com>2021-03-15 22:30:22 +0000
commitdc40ece3c389804df6d9423e0d52c8da2355ea17 (patch)
tree0a49d6d7fa4461e0ef9d7de736f390fc9ef424e3 /test/test_getmatches.vader
parentbd808dca3092f1db56b26e22bc23234f97cb6388 (diff)
downloadale-dc40ece3c389804df6d9423e0d52c8da2355ea17.zip
#3632 Add ale#util#MapMatches
Diffstat (limited to 'test/test_getmatches.vader')
-rw-r--r--test/test_getmatches.vader15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_getmatches.vader b/test/test_getmatches.vader
index e728b571..edf84f6e 100644
--- a/test/test_getmatches.vader
+++ b/test/test_getmatches.vader
@@ -72,6 +72,21 @@ Execute (ale#util#GetMatches should accept a string for a single pattern):
\ '^.*:\(\d\+\):\(\d\+\): \(.\+\) \[\(.\+\)\]$'
\ )
+Execute (ale#util#MapMatches should map matches):
+ AssertEqual
+ \ [
+ \ '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]',
+ \ '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]',
+ \ ],
+ \ ale#util#MapMatches(
+ \ [
+ \ '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]',
+ \ '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]',
+ \ ],
+ \ '^.*:\(\d\+\):\(\d\+\): \(.\+\) \[\(.\+\)\]$',
+ \ {match -> match[0]}
+ \ )
+
Execute (ale#util#GetMatches should accept a single line as a string):
AssertEqual
\ [