Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup #5409: Add missing lexer specs #5410

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/compiler/lexer/lexer_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ describe "Lexer" do
token.type.should eq(:EOF)
end

assert_syntax_error "/foo", "unterminated regular expression"
assert_syntax_error "/foo", "Unterminated regular expression"
assert_syntax_error ":\"foo", "unterminated quoted symbol"

it "lexes utf-8 char" do
Expand Down
4 changes: 2 additions & 2 deletions spec/compiler/lexer/lexer_string_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ describe "Lexer string" do
token = lexer.next_token
state = token.delimiter_state

expect_raises Crystal::SyntaxException, /unterminated heredoc/ do
expect_raises Crystal::SyntaxException, "Unterminated heredoc" do
loop do
token = lexer.next_string_token state
break if token.type == :DELIMITER_END
Expand Down Expand Up @@ -282,7 +282,7 @@ describe "Lexer string" do
it "raises on unexpected EOF while lexing heredoc" do
lexer = Lexer.new("<<-aaa")

expect_raises Crystal::SyntaxException, /unexpected EOF on heredoc identifier/ do
expect_raises Crystal::SyntaxException, "Unexpected EOF on heredoc identifier" do
lexer.next_token
end
end
Expand Down