1
0
Fork 0
mirror of synced 2024-07-02 21:41:09 -04:00
ultimate-vim/sources_non_forked/vim-ruby/spec/syntax/statement_modifiers_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

32 lines
775 B
Ruby

require 'spec_helper'
describe "Syntax highlighting" do
specify "only modifiers can appear after regexp literals" do
# See issue #254
assert_correct_highlighting <<~'EOF', 'if', 'rubyConditionalModifier'
def get_regex
/some regex/ if false
end
EOF
end
specify "only modifiers can appear after unparenthesised no-arg method calls" do
[
"foo if true",
"foo? if true",
"foo! if true",
"foo_ if true",
"foo_? if true",
"foo_! if true",
"foo42 if true",
"foo42? if true",
"foo42! if true",
"Foo if true",
"Foo? if true",
"Foo! if true"
].each do |str|
assert_correct_highlighting str, 'if', 'rubyConditionalModifier'
end
end
end