mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 15:00:06 +08:00
27 lines
831 B
Ruby
Vendored
27 lines
831 B
Ruby
Vendored
require 'spec_helper'
|
|
|
|
describe "Syntax highlighting" do
|
|
specify "heredocs starting after parenthesised method definitions" do
|
|
# See issue #356
|
|
assert_correct_highlighting <<~'EOF', 'HTML', 'rubyHeredocDelimiter'
|
|
def youtube_video(token, width = 360, height = 215)
|
|
<<-HTML if token
|
|
<iframe width="#{width}" height="#{height}" src="http://www.youtube.com/embed/#{token}" frameborder="0" allowfullscreen></iframe>
|
|
HTML
|
|
end
|
|
EOF
|
|
end
|
|
|
|
specify "heredocs do not start after string literals" do
|
|
assert_correct_highlighting <<~'EOF', 'FOO', 'rubyConstant'
|
|
"abc" <<FOO
|
|
EOF
|
|
assert_correct_highlighting <<~'EOF', 'FOO', 'rubyConstant'
|
|
'abc' <<FOO
|
|
EOF
|
|
assert_correct_highlighting <<~'EOF', 'FOO', 'rubyConstant'
|
|
`abc` <<FOO
|
|
EOF
|
|
end
|
|
end
|