Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
maralla committed Oct 25, 2019
1 parent 1c244b7 commit 517f8f0
Showing 7 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pythonx/validator/__init__.py
Original file line number Diff line number Diff line change
@@ -117,7 +117,7 @@ def parse_loclist(self, loclist, bufnr):
continue

loc = g.groupdict()
col = loc.get('col', -1) if self.instant else -1
col = loc.get('col', -1)
loc.update(self.compose_loc(i + 1, bufnr, _get_type(loc),
loc.get('text', ''), col))
lists.append(loc)
1 change: 1 addition & 0 deletions tests/test_lua.py
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ def test_luac():
res = LuaCLint().parse_loclist(msg, 1)
assert json.loads(res)[0] == {
"lnum": "16",
"col": -1,
"text": "[luac]syntax error near <eof>",
"enum": 1,
"bufnr": 1,
1 change: 1 addition & 0 deletions tests/test_perl.py
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ def test_perl():
assert json.loads(res)[0] == {
"lnum": "26",
"text": "[perl]Missing $ on loop variable at bin/foo line 26.",
"col": -1,
"enum": 1,
"type": "E",
"bufnr": 1
3 changes: 3 additions & 0 deletions tests/test_rst.py
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ def test_rst2pseudoxml_severe_dot_regex():
assert json.loads(res)[0] == {
"lnum": "355",
"bufnr": 1,
"col": -1,
"enum": 1,
"text": u'[rst2pseudoxml.py]Unexpected section title or transition.',
"type": "E",
@@ -27,6 +28,7 @@ def test_rst2pseudoxml_severe_colon_regex():
res = RST2PseudoXMLLint().parse_loclist(msg, 1)
assert json.loads(res)[0] == {
"lnum": "123",
"col": -1,
"bufnr": 1,
"enum": 1,
"text": u'[rst2pseudoxml.py]Unexpected section title or transition:',
@@ -45,6 +47,7 @@ def test_rst2pseudoxml_warning_regex():
assert json.loads(res)[0] == {
"lnum": "251",
"bufnr": 1,
"col": -1,
"enum": 1,
"text": u'[rst2pseudoxml.py]Title level inconsistent.',
"type": "W",
1 change: 1 addition & 0 deletions tests/test_ruby.py
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ def test_ruby():
res = Ruby().parse_loclist(msg, 1)
assert json.loads(res)[0] == {
"lnum": "50",
"col": -1,
"bufnr": 1,
"enum": 1,
"text": '[ruby]syntax error, unexpected end-of-input, expecting keyword_end',
1 change: 1 addition & 0 deletions tests/test_sh.py
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ def test_regex():
assert json.loads(res)[0] == {
"lnum": "10",
"text": "[sh]syntax error: unexpected end of file",
"col": -1,
"enum": 1,
"type": "E",
"bufnr": 1
1 change: 1 addition & 0 deletions tests/test_zsh.py
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ def test_zsh():
assert json.loads(res)[0] == {
"lnum": "598",
"bufnr": 1,
"col": -1,
"enum": 1,
"text": '[zsh]no such file or directory: /etc/ssh/ssh_known_hosts2',
"type": "E",

0 comments on commit 517f8f0

Please sign in to comment.