Added and updated some plugins
Added: vim-ruby, typescript-vim, vim-javascript Updated: rust-vim
This commit is contained in:
73
sources_non_forked/vim-ruby/spec/indent/basic_spec.rb
Normal file
73
sources_non_forked/vim-ruby/spec/indent/basic_spec.rb
Normal file
@@ -0,0 +1,73 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "Indenting" do
|
||||
specify "if-clauses" do
|
||||
assert_correct_indenting <<~EOF
|
||||
if foo
|
||||
bar
|
||||
end
|
||||
EOF
|
||||
|
||||
assert_correct_indenting <<~EOF
|
||||
if foo
|
||||
bar
|
||||
else
|
||||
baz
|
||||
end
|
||||
EOF
|
||||
|
||||
assert_correct_indenting <<~EOF
|
||||
bar if foo
|
||||
something_else
|
||||
EOF
|
||||
end
|
||||
|
||||
specify "heredocs" do
|
||||
assert_correct_indenting <<~EOF
|
||||
def one
|
||||
two = <<-THREE
|
||||
four
|
||||
THREE
|
||||
end
|
||||
EOF
|
||||
|
||||
assert_correct_indenting <<~EOF
|
||||
def one
|
||||
two = <<THREE
|
||||
four
|
||||
THREE
|
||||
end
|
||||
EOF
|
||||
|
||||
assert_correct_indenting <<~EOF
|
||||
def one
|
||||
two = <<~THREE
|
||||
four
|
||||
THREE
|
||||
end
|
||||
EOF
|
||||
|
||||
# See https://github.com/vim-ruby/vim-ruby/issues/318 for details
|
||||
assert_correct_indenting <<~EOF
|
||||
def foo
|
||||
<<-EOS
|
||||
one
|
||||
\#{two} three
|
||||
four
|
||||
EOS
|
||||
end
|
||||
EOF
|
||||
end
|
||||
|
||||
specify "comments" do
|
||||
assert_correct_indenting <<~EOF
|
||||
def one
|
||||
example do |something|
|
||||
=begin
|
||||
something that is ignored
|
||||
=end
|
||||
end
|
||||
end
|
||||
EOF
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user