1
0
Fork 0
mirror of synced 2024-07-02 21:41:09 -04:00
ultimate-vim/sources_non_forked/vim-ruby/spec/syntax/blocks_spec.rb
201341 cc444efe2c Revert "Merge pull request #1 from 201341/swj/dev"
This reverts commit f93aa0fb39, reversing
changes made to e13b2a10a7.
2021-10-27 11:36:39 +08:00

18 lines
521 B
Ruby

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