Skip to content

Commit c484cdb

Browse files
committed
Fix test
1 parent c419138 commit c484cdb

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/language_server/linter/ruby_wc_test.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,19 @@ def test_error
88
if a == "\\n"
99
EOS
1010

11+
# <compiled>:2: syntax error, unexpected $undefined, expecting end-of-input
12+
# if a == "\n"
13+
# ^
14+
15+
characters =
16+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.5.0")
17+
9..10
18+
else
19+
10..11
20+
end
21+
1122
assert {
12-
linter.call == [Error.new(line_num: 1, characters: 10..11, message: "unexpected $undefined, expecting end-of-input", type: "syntax error")]
23+
linter.call == [Error.new(line_num: 1, characters: characters, message: "unexpected $undefined, expecting end-of-input", type: "syntax error")]
1324
}
1425
end
1526

0 commit comments

Comments
 (0)