Skip to content

Commit

Permalink
Test for bug mirah/mirah-parser#25.
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix von Ferey committed Jul 20, 2015
1 parent 37479b1 commit 54c6708
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions test/jvm/jvm_compiler_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2032,5 +2032,41 @@ def baz
})
assert_run_output("BAZ\n", cls)
end

def test_line_number_increase_by_multiline_sstring_literal
e = assert_raise_kind_of Mirah::MirahError do
cls, arg = compile(%q{
class Foo
CONST = 'a
b'
end
ERROR_SHOULD_BE_HERE
})
end
assert_equal 11,e.diagnostic.getLineNumber
end

def test_line_number_increase_by_multiline_dstring_literal
e = assert_raise_kind_of Mirah::MirahError do
cls, arg = compile(%q{
class Foo
CONST = "a
b"
end
ERROR_SHOULD_BE_HERE
})
end
assert_equal 11,e.diagnostic.getLineNumber
end

end

0 comments on commit 54c6708

Please sign in to comment.