diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/handler/test_solhint_handler.vader | 21 | ||||
-rw-r--r-- | test/linter/test_solhint.vader | 4 |
2 files changed, 11 insertions, 14 deletions
diff --git a/test/handler/test_solhint_handler.vader b/test/handler/test_solhint_handler.vader index f8fffb60..b9cdacc7 100644 --- a/test/handler/test_solhint_handler.vader +++ b/test/handler/test_solhint_handler.vader @@ -50,16 +50,15 @@ Execute(The solhint handler should parse linter error messages correctly): \ 'type': 'E', \ }, \ ], - \ ale#handlers#solhint#Handle(bufnr(''), [ - \ 'contracts/Bounty.sol: line 1, col 17, Warning - Compiler version must be fixed (compiler-fixed)', - \ 'contracts/Bounty.sol: line 4, col 8, Error - Use double quotes for string literals (quotes)', - \ 'contracts/Bounty.sol: line 5, col 8, Error - Use double quotes for string literals (quotes)', - \ 'contracts/Bounty.sol: line 13, col 3, Error - Expected indentation of 4 spaces but found 2 (indent)', - \ 'contracts/Bounty.sol: line 14, col 3, Error - Expected indentation of 4 spaces but found 2 (indent)', - \ 'contracts/Bounty.sol: line 47, col 3, Error - Function order is incorrect, public function can not go after internal function. (func-order)', + \ ale_linters#solidity#solhint#Handle(bufnr(''), [ + \ 'contracts/Bounty.sol:1:17: Compiler version must be fixed [Warning/compiler-fixed]', + \ 'contracts/Bounty.sol:4:8: Use double quotes for string literals [Error/quotes]', + \ 'contracts/Bounty.sol:5:8: Use double quotes for string literals [Error/quotes]', + \ 'contracts/Bounty.sol:13:3: Expected indentation of 4 spaces but found 2 [Error/indent]', + \ 'contracts/Bounty.sol:14:3: Expected indentation of 4 spaces but found 2 [Error/indent]', + \ 'contracts/Bounty.sol:47:3: Function order is incorrect, public function can not go after internal function. [Error/func-order]', \ ]) - Execute(The solhint handler should parse syntax error messages correctly): AssertEqual \ [ @@ -78,7 +77,7 @@ Execute(The solhint handler should parse syntax error messages correctly): \ 'type': 'E', \ }, \ ], - \ ale#handlers#solhint#Handle(bufnr(''), [ - \ "contracts/Bounty.sol: line 30, col 4, Error - Parse error: missing ';' at 'uint248'", - \ "contracts/Bounty.sol: line 203, col 4, Error - Parse error: no viable alternative at input '_loserStakeMultiplier}'", + \ ale_linters#solidity#solhint#Handle(bufnr(''), [ + \ "contracts/Bounty.sol:30:4: Parse error: missing ';' at 'uint248' [Error]", + \ "contracts/Bounty.sol:203:4: Parse error: no viable alternative at input '_loserStakeMultiplier}' [Error]", \ ]) diff --git a/test/linter/test_solhint.vader b/test/linter/test_solhint.vader index fc5afa9b..f4b07656 100644 --- a/test/linter/test_solhint.vader +++ b/test/linter/test_solhint.vader @@ -1,8 +1,7 @@ Before: call ale#assert#SetUpLinterTest('solidity', 'solhint') - runtime autoload/ale/handlers/solhint.vim - let b:args = ' --formatter compact %s' + let b:args = ' --formatter unix %s' After: unlet! b:args @@ -18,7 +17,6 @@ Execute(The options should be configurable): AssertLinter 'solhint', ale#Escape('solhint') . ' --foobar' . b:args - Execute(solhint should be run from a containing project with solhint executable): call ale#test#SetFilename('../test-files/solhint/Contract.sol') |