]> git.madduck.net Git - etc/vim.git/blob - test/handler/test_bibclean_handler.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / test / handler / test_bibclean_handler.vader
1 Before:
2   runtime ale_linters/bib/bibclean.vim
3
4 After:
5   call ale#linter#Reset()
6
7 Execute(The bibclean handler should parse lines from bibclean <= v2.11.4 correctly):
8   AssertEqual
9   \ [
10   \   {
11   \     'lnum': '60',
12   \     'type': 'W',
13   \     'text': 'Unexpected value in ``month = "09"''''.',
14   \     'col': '17'
15   \   },
16   \   {
17   \     'lnum': '63',
18   \     'type': 'E',
19   \     'text': 'Expected comma after last field ``keywords''''.',
20   \     'col': ' 1'
21   \   },
22   \   {
23   \     'lnum': '176',
24   \     'type': 'W',
25   \     'text': 'Unexpected DOI in URL value ``"https://doi.org/DOI"'''': move to separate DOI = "..." key/value in this entry.',
26   \     'col': '14'
27   \   }
28   \ ],
29   \ ale_linters#bib#bibclean#Handle(255, [
30   \ "%% \"stdin\", line 60: Unexpected value in ``month = \"09\"''.",
31   \ "%%  File positions:  input [main.bib]  output [stdout]",
32   \ "%%  Entry   input byte=1681 line=50 column= 1 output byte=1680 line=50 column= 0",
33   \ "%%  Value   input byte=2137 line=60 column=17 output byte=2137 line=60 column=17",
34   \ "%%  Current input byte=2139 line=60 column=19 output byte=2137 line=60 column=17",
35   \ "?? \"stdin\", line 71: Expected comma after last field ``keywords''.",
36   \ "??  File positions:  input [main.bib]  output [stdout]",
37   \ "??  Entry   input byte=2145 line=63 column= 1 output byte=2146 line=63 column= 0",
38   \ "??  Value   input byte=2528 line=71 column= 2 output byte=2527 line=70 column=49",
39   \ "??  Current input byte=2529 line=71 column= 3 output byte=2528 line=70 column=50",
40   \ "%% \"stdin\", line 176: Unexpected DOI in URL value ``\"https://doi.org/DOI\"'': move to separate DOI = \"...\" key/value in this entry.",
41   \ "%%  File positions:  input [stdin]  output [stdout]",
42   \ "%%  Entry   input byte=6813 line=174 column= 1 output byte=8543 line=227 column= 0",
43   \ "%%  Value   input byte=6890 line=176 column=14 output byte=8641 line=229 column=17",
44   \ "%%  Current input byte=6938 line=176 column=62 output byte=8641 line=229 column=17"
45   \ ])
46
47 Execute(The bibclean handler should parse lines of bibclean > v2.11.4 correctly):
48   AssertEqual
49   \ [
50   \   {
51   \     'lnum': '60',
52   \     'type': 'W',
53   \     'text': 'Unexpected value in ``month = "09"''''.',
54   \     'col': '17'
55   \   },
56   \   {
57   \     'lnum': '63',
58   \     'type': 'E',
59   \     'text': 'Expected comma after last field ``keywords''''.',
60   \     'col': ' 1'
61   \   },
62   \   {
63   \     'lnum': '176',
64   \     'type': 'W',
65   \     'text': 'Unexpected DOI in URL value ``"https://doi.org/DOI"'''': move to separate DOI = "..." key/value in this entry.',
66   \     'col': '14'
67   \   }
68   \ ],
69   \ ale_linters#bib#bibclean#Handle(255, [
70   \ "%% stdin:60:Unexpected value in ``month = \"09\"''.",
71   \ "%%  File positions:  input [main.bib]  output [stdout]",
72   \ "%%  Entry   input byte=1681 line=50 column= 1 output byte=1680 line=50 column= 0",
73   \ "%%  Value   input byte=2137 line=60 column=17 output byte=2137 line=60 column=17",
74   \ "%%  Current input byte=2139 line=60 column=19 output byte=2137 line=60 column=17",
75   \ "?? stdin:71:Expected comma after last field ``keywords''.",
76   \ "??  File positions:  input [main.bib]  output [stdout]",
77   \ "??  Entry   input byte=2145 line=63 column= 1 output byte=2146 line=63 column= 0",
78   \ "??  Value   input byte=2528 line=71 column= 2 output byte=2527 line=70 column=49",
79   \ "??  Current input byte=2529 line=71 column= 3 output byte=2528 line=70 column=50",
80   \ "%% stdin:176:Unexpected DOI in URL value ``\"https://doi.org/DOI\"'': move to separate DOI = \"...\" key/value in this entry.",
81   \ "%%  File positions:  input [stdin]  output [stdout]",
82   \ "%%  Entry   input byte=6813 line=174 column= 1 output byte=8543 line=227 column= 0",
83   \ "%%  Value   input byte=6890 line=176 column=14 output byte=8641 line=229 column=17",
84   \ "%%  Current input byte=6938 line=176 column=62 output byte=8641 line=229 column=17"
85   \ ])
86