1
0
Fork 0
mirror of synced 2024-11-12 20:28:58 -05:00
ultimate-vim/sources_non_forked/vim-ruby/spec/syntax/blocks_spec.rb
2021-06-30 12:00:07 -05:00

17 lines
521 B
Ruby
Executable file

require 'spec_helper'
describe "Syntax highlighting" do
specify "block parameters" do
assert_correct_highlighting <<~'EOF', 'bar', 'rubySymbol'
foo { |bar:| 42 }
EOF
assert_correct_highlighting <<~'EOF', %w[bar\ze: baz\ze:], 'rubySymbol'
foo { |bar: 'bar', baz: 'baz'| 42 }
EOF
end
specify "block parameters with default values including '|'" do
assert_correct_highlighting <<~'EOF', %w[|\zebar qux)\zs|], 'rubyBlockParameterList'
foo { |bar=(baz|qux)| 42 }
EOF
end
end