Skip to content

Commit

Permalink
Add test for multiline disable-previous-line comment
Browse files Browse the repository at this point in the history
  • Loading branch information
fvictorio committed Dec 20, 2018
1 parent f174345 commit 3c0bb6c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/comment-directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('Linter', () => {
assertErrorCount(report, 1)
})

it('should disable only one compiler error using multiline comment', () => {
it('should disable only one compiler error on next line using multiline comment', () => {
const report = linter.processStr(
`
/* solhint-disable-next-line */
Expand All @@ -60,6 +60,19 @@ describe('Linter', () => {
assertErrorCount(report, 1)
})

it('should disable only one compiler error on previous line using multiline comment', () => {
const report = linter.processStr(
`
pragma solidity ^0.4.4;
/* solhint-disable-previous-line */
pragma solidity 0.3.4;
`,
noIndent()
)

assertErrorCount(report, 1)
})

it('should disable only compiler version error', () => {
const report = linter.processStr(
`
Expand Down

0 comments on commit 3c0bb6c

Please sign in to comment.