summaryrefslogtreecommitdiff
path: root/test/handler
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-12-06 20:26:04 +0000
committerGitHub <noreply@github.com>2018-12-06 20:26:04 +0000
commit3db564f7742360a870679ef6c63361371646fed8 (patch)
treec711e395e69d6a8ca870b2632f5c5861276ef9fb /test/handler
parentfdd37acc1f381230fc2ed87303e98c7a4daafaad (diff)
parent9e97a6914e1f7f5ab4ac80c33150c42f733d3a1b (diff)
downloadale-3db564f7742360a870679ef6c63361371646fed8.zip
Merge pull request #2061 from hsanson/1910-add-support-for-bibclean-fixer
Add bibclean fixer support
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_bibclean_handler.vader35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/handler/test_bibclean_handler.vader b/test/handler/test_bibclean_handler.vader
new file mode 100644
index 00000000..6179d7f5
--- /dev/null
+++ b/test/handler/test_bibclean_handler.vader
@@ -0,0 +1,35 @@
+Before:
+ runtime ale_linters/bib/bibclean.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute(The bibclean handler should parse lines correctly):
+
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': '60',
+ \ 'type': 'W',
+ \ 'text': 'Unexpected value in ``month = "09"''''.',
+ \ 'col': '17'
+ \ },
+ \ {
+ \ 'lnum': '63',
+ \ 'type': 'E',
+ \ 'text': 'Expected comma after last field ``keywords''''.',
+ \ 'col': ' 1'
+ \ }
+ \ ],
+ \ ale_linters#bib#bibclean#Handle(255, [
+ \ "%% \"stdin\", line 60: Unexpected value in ``month = \"09\"''.",
+ \ "%% File positions: input [main.bib] output [stdout]",
+ \ "%% Entry input byte=1681 line=50 column= 1 output byte=1680 line=50 column= 0",
+ \ "%% Value input byte=2137 line=60 column=17 output byte=2137 line=60 column=17",
+ \ "%% Current input byte=2139 line=60 column=19 output byte=2137 line=60 column=17",
+ \ "?? \"stdin\", line 71: Expected comma after last field ``keywords''.",
+ \ "?? File positions: input [main.bib] output [stdout]",
+ \ "?? Entry input byte=2145 line=63 column= 1 output byte=2146 line=63 column= 0",
+ \ "?? Value input byte=2528 line=71 column= 2 output byte=2527 line=70 column=49",
+ \ "?? Current input byte=2529 line=71 column= 3 output byte=2528 line=70 column=50"
+ \ ])